Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Child terms unticked by default › Reply To: Child terms unticked by default
July 18, 2022 at 4:11 pm
#38471
Keymaster
Hi,
I had to a dig a bit for this, but I recall someone else about a year ago had a similar request, and we found a possible solution with minimal coding.
Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('wp_footer', 'asp_add_menu_stop_checkbox_parent_child');
function asp_add_menu_stop_checkbox_parent_child() {
?>
<script>
jQuery(function($){
$('*[data-lvl]').removeAttr('data-lvl');
});
</script>
<?php
}
This should basically remove the attribute from the checkbox elements, which indicates their levels.