Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - Category list order in post edit page

Tags:

wordpress

I want to stop WordPress re-ordering the category list in the admin > post edit page. The default behaviour is to take the categories assigned to the post out of their natural parent/child flow and put them at the top of the list. I want to stop this happening as it is confusing when the category structure is big.

Any thoughts?

Thanks.

like image 721
Wesley Burden Avatar asked Jan 28 '11 16:01

Wesley Burden


1 Answers

While the above are great alternative solutions, especially if you want more control over the taxonomy checklist metabox, I think the simplest solution would be the following:

function taxonomy_checklist_checked_ontop_filter ($args)
{

    $args['checked_ontop'] = false;
    return $args;

}

add_filter('wp_terms_checklist_args','taxonomy_checklist_checked_ontop_filter');

And that should take care of that!

like image 149
Jonathan Avatar answered Oct 04 '22 06:10

Jonathan