Forum Replies Created
-
AuthorPosts
-
theape
ParticipantYou cannot access this content.
theape
ParticipantThank you, that did the job. 🙂
theape
ParticipantAlmost, I’ve got the tick on hover now, but it doesn’t remain after an item is clicked.
not overriding all of the CSS, it is better to use a few override rules
I would have done that and preferred to, but I think there were too many conflicts with the results CSS.
theape
ParticipantYou cannot access this content.
theape
ParticipantUpdating to the latest version broke my custom CSS, boxes no longer tick when clicked on. Is there a quick fix due to a naming convention change or do I need to rework my custom CSS from scratch to find the issue?
theape
ParticipantYou cannot access this content.
theape
ParticipantWhat do I need in my template to get the Ajax loading spinner working?
theape
ParticipantFor future reference, normally for myself as I’ve forgotten how something was accomplished and my comments don’t help. This is what I did.
I added this code to a custom plugin that I’m using to modify ASP functionality.
// Hook to prevent the plugin stylesheet (CSS) files loading add_filter( 'asp_load_css', 'illo_asp_stop_load_css', 10, 1 ); function illo_asp_stop_load_css( $stop ) { if (is_page('search')) { return true; } } add_action( 'get_footer', 'illo_asp_custom_css' ); function illo_asp_custom_css() { if (is_page('search')) { wp_enqueue_style( 'illo_asp_custom_css', get_stylesheet_directory_uri() . '/asp/style.css' ); } }I made a copy of the following file and uploaded it to the asp folder in my child theme.
wp-content/uploads/asp_upload/style.instances-{OPTIONAL_QR_STRING}.cssThen I commented out the following CSS.
Line 2560
/* div.asp_r.asp_r_2, div.asp_r.asp_r_2 *, div.asp_m.asp_m_2, div.asp_m.asp_m_2 *, div.asp_s.asp_s_2, div.asp_s.asp_s_2 * { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -ms-box-sizing: content-box; -o-box-sizing: content-box; box-sizing: content-box; border: 0; border-radius: 0; text-transform: none; text-shadow: none; box-shadow: none; text-decoration: none; text-align: left; letter-spacing:normal } */Line 2584
/* div.asp_r.asp_r_2, div.asp_r.asp_r_2 *, div.asp_m.asp_m_2, div.asp_m.asp_m_2 *, div.asp_s.asp_s_2, div.asp_s.asp_s_2 * { padding: 0; margin:0 } */Line 3303
/* #ajaxsearchprores2_1.vertical .resdrg, #ajaxsearchprores2_2.vertical .resdrg, div.asp_r.asp_r_2.vertical .resdrg { display: flex; flex-wrap:wrap } */Obviously the stylesheet I made a copy of is created dynamically from the options chosen in List > Theme & Styling. But generally these were the style that were causing me issues with my specific set up.
theape
ParticipantThat’s exactly what I needed! I don’t know how I missed that in the ‘filters’ documentation. I think I was hung up on it being in the templating section, or not being.
I’m going to add a custom style.cc in the asp theme folder that includes the asp styles that I want to keep and ‘wp_enqueue_script’ said style.css in the footer via my ASP Mod plugin.
Can I suggest/put forward a potential future feature, that by adding a style.cc to the asp folder in the theme folder overrides the frontend css added by the plugin automatically?
theape
ParticipantYou cannot access this content.
theape
ParticipantFor anyone else who runs into this issue, here’s the complete code with the refresh issue solved too.
add_action('wp_footer', 'asp_add_menu_stop_checkbox_parent_child'); function asp_add_menu_stop_checkbox_parent_child() { ?> <script> jQuery(document).ready(function($){ $(window).load(function(){ $('*[data-lvl]').removeAttr('data-lvl'); $(".asp_option_cat_level-1").hide(); $(".asp_option_cat_level-2").hide(); $(".asp_option_cat_level-0").click(function(){ var $next = $(this).next(), checked = $(this).find('input[type=checkbox]').prop('checked'); while ( $next.hasClass('asp_option_cat_level-1') || $next.hasClass('asp_option_cat_level-2') ) { if ( $next.hasClass('asp_option_cat_level-1') ) { $next.toggle(); } else { $next.hide(); } if ( !checked ) { $next.find('input[type=checkbox]').prop('checked', false); } $next = $next.next(); } }); $(".asp_option_cat_level-1").click(function(){ var $next = $(this).next(), checked = $(this).find('input[type=checkbox]').prop('checked'); while ( $next.hasClass('asp_option_cat_level-2') ) { $next.toggle(); if ( !checked ) { $next.find('input[type=checkbox]').prop('checked', false); } $next = $next.next(); } }); }); }); </script> <?php }theape
ParticipantYou cannot access this content.
theape
ParticipantYou cannot access this content.
theape
ParticipantYou cannot access this content.
theape
ParticipantThank you, that’s brilliant! The only bit I can’t figure out now is how to get the children to uncheck automatically when the parent is unchecked.
-
AuthorPosts