Support » Plugins » Hacks » Admin New Post Categories only child categories

  • Resolved padreed123


    Im trying to change my new post categories check boxes to only show the deepest level of children(no parent cats). I see this function on line 339 of /wp-admin/includes/meta-boxes.php

    <?php wp_terms_checklist($post->ID, array( 'taxonomy' => $taxonomy, 'popular_cats' => $popular_ids ) ) ?>

    but there’s no depth $arg or anything like it according to the codex.

    Anyone have any ideas? Thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz


    I’m unaware of any terms or category function that would easily return only the deepest children. The only way I know of to get such results is to extend the Walker class to go through the entire structure and collect all terms that have no children. You can then create a new object based on this and pass it to wp_terms_checklist() or wp_category_checklist() to have it output the categories you want.

    Thats what I was worried about.. So much for being a lazy programmer. :'(

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Admin New Post Categories only child categories’ is closed to new replies.