admin管理员组文章数量:1313795
Working with a custom post type in Wordpress, I would like to use the categories. So I added the categories to the cpt. No problems here.
But, when adding or editing cpt items, I would like to filter the categories they can choose from.
Currently it shows all categories. But I want to show only specific categories (or categories below a specific parent category).
FYI: A special taxonomy for the cpt is not an option in my use case.
I cannot find a filter / action I could use to filter all categories shown on a edit page for a specific CPT.
Example of the situation
A custom-post-type named 'Books'. Normal Wordpress categories: 'category A', 'category B', 'subcategory A-1', 'subcategory A-2'
When editing a 'Book', I want the category select box to show: 'subcategory A-1', 'subcategory A-2'. And omit all other categories.
All help is appreciated.
本文标签: Filter Categories in meta box for CPTs
版权声明:本文标题:Filter Categories in meta box for CPTs 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741900813a2403858.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论