4

I have several sub-categories set up. Everything displays properly as far as nesting (see below) when creating a new post.

Category 1

--Sub Category 1

--Sub Category 2

--Sub Category 3

Category 2

etc

After I select a sub-category, then go back and edit a post, the sub category that I check shows up like this (note how it's not nested under Category 1):

(checkmark) Sub Category 2

Category 1

--Sub Category 1

--Sub Category 3

Category 2

etc

Is this a bug in WordPress 3.1.2? Can someone tell me how to fix it? I don't remember it doing this when I was running 3.0.5 (but there's a chance it could have).

8

This "feature" has been in WP for quite a while.

You can disable it by installing this small plugin:

http://wordpress.org/extend/plugins/category-checklist-tree/

  • Very nice dude. This worked perfectly! – user1462 May 23 '11 at 16:21
  • Does anyone know if this is still the best way to remove this 'feature'? – rob-gordon May 3 '16 at 14:51
  • 1
    This plugin is over 4 years old and can't be reliably used because as of today it has not been tested with the latest 191 major and minor wordpress versions. – Peter Kionga-Kamau Jan 23 '18 at 17:47
  • True, but the plugin only really adds 3 lines of code that are important. And these still work flawlessly. See my new answer for more info. – swissspidy Jan 23 '18 at 18:07
0

It was mentioned that scribu's plugin hasn't been updated in four years. However, the plugin is fairly simple and the most important part is this:

add_filter( 'wp_terms_checklist_args', function( $args ) {
  $args['checked_ontop'] = false;

  return $args;
} );

That's what the plugin mainly does — plus some JavaScript to scroll to the first category checkbox that is checked. But that's just for convenience.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.