This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Child terms unticked by default

#38471
Ernest MarcinkoErnest Marcinko
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.