Why aren't sub-categories nested after creating post in the WP Admin?

admin2025-06-05  1

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).

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).

Share Improve this question edited Sep 19, 2011 at 23:30 kaiser 51k27 gold badges151 silver badges245 bronze badges asked May 23, 2011 at 16:14 user1462user1462 1,3043 gold badges17 silver badges23 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 8

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

You can disable it by installing this small plugin:

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

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749124783a316574.html

最新回复(0)