admin管理员组文章数量:1026396
Is there a way to avoid WordPress "flattening" the category tree when a child category is selected?
This applies to both custom taxonomies and WP's built in "category" taxonomy.
To explain further, say I have the following category tree:
Parent
Child
Grandchild
Another parent
Another child
Another child
A third parent
If I then select "Grandchild" as my category, the tree will now look like this upon saving:
Grandchild
Parent
Child
Another parent
Another child
Another child
A third parent
This makes it very hard for authors to remember which grandchild belongs to which parent and imo makes absolutely zero sense. I guess one reason for this might be so that the selected category is always in the top of the list, but I would very much like to disable this behaviour.
Also see attached image.
Please note that this is not theme or plugin-related. I tried this with a completely fresh WP-install with zero plugins and the default theme.
Is there a way to avoid WordPress "flattening" the category tree when a child category is selected?
This applies to both custom taxonomies and WP's built in "category" taxonomy.
To explain further, say I have the following category tree:
Parent
Child
Grandchild
Another parent
Another child
Another child
A third parent
If I then select "Grandchild" as my category, the tree will now look like this upon saving:
Grandchild
Parent
Child
Another parent
Another child
Another child
A third parent
This makes it very hard for authors to remember which grandchild belongs to which parent and imo makes absolutely zero sense. I guess one reason for this might be so that the selected category is always in the top of the list, but I would very much like to disable this behaviour.
Also see attached image.
Please note that this is not theme or plugin-related. I tried this with a completely fresh WP-install with zero plugins and the default theme.
Share Improve this question asked Jan 3, 2017 at 14:05 powerbuoypowerbuoy 8421 gold badge7 silver badges15 bronze badges2 Answers
Reset to default 2I haven't fully tested this, but it may be helpful: Categories in Hierarchical Order plugin at https://wordpress/plugins/categories-in-hierarchical-order/
The plugin can be resumed to this simple code:
add_filter( 'wp_terms_checklist_args', function( $args ) {
$args['checked_ontop'] = false;
return $args;
});
Is there a way to avoid WordPress "flattening" the category tree when a child category is selected?
This applies to both custom taxonomies and WP's built in "category" taxonomy.
To explain further, say I have the following category tree:
Parent
Child
Grandchild
Another parent
Another child
Another child
A third parent
If I then select "Grandchild" as my category, the tree will now look like this upon saving:
Grandchild
Parent
Child
Another parent
Another child
Another child
A third parent
This makes it very hard for authors to remember which grandchild belongs to which parent and imo makes absolutely zero sense. I guess one reason for this might be so that the selected category is always in the top of the list, but I would very much like to disable this behaviour.
Also see attached image.
Please note that this is not theme or plugin-related. I tried this with a completely fresh WP-install with zero plugins and the default theme.
Is there a way to avoid WordPress "flattening" the category tree when a child category is selected?
This applies to both custom taxonomies and WP's built in "category" taxonomy.
To explain further, say I have the following category tree:
Parent
Child
Grandchild
Another parent
Another child
Another child
A third parent
If I then select "Grandchild" as my category, the tree will now look like this upon saving:
Grandchild
Parent
Child
Another parent
Another child
Another child
A third parent
This makes it very hard for authors to remember which grandchild belongs to which parent and imo makes absolutely zero sense. I guess one reason for this might be so that the selected category is always in the top of the list, but I would very much like to disable this behaviour.
Also see attached image.
Please note that this is not theme or plugin-related. I tried this with a completely fresh WP-install with zero plugins and the default theme.
Share Improve this question asked Jan 3, 2017 at 14:05 powerbuoypowerbuoy 8421 gold badge7 silver badges15 bronze badges2 Answers
Reset to default 2I haven't fully tested this, but it may be helpful: Categories in Hierarchical Order plugin at https://wordpress/plugins/categories-in-hierarchical-order/
The plugin can be resumed to this simple code:
add_filter( 'wp_terms_checklist_args', function( $args ) {
$args['checked_ontop'] = false;
return $args;
});
本文标签: categoriesCategory tree is flattened inside admin upon saving
版权声明:本文标题:categories - Category tree is flattened inside admin upon saving 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745649114a2161205.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论