admin管理员组文章数量:1122832
I'm using my own taxonomy for blog posts and would like to remove Categories and Tags from the Dashboard. I've removed them from the Admin Menu and the meta boxes on the Edit Posts page from this question here: Remove Categories / Tags From Admin Menu
But now I'm trying to remove it from the All Posts page in the Dashboard where it shows a list of all the posts in a table and across the top are Title, Author, Categories, Tags, Date, etc. I can't seem to find how to do this.
I'm using my own taxonomy for blog posts and would like to remove Categories and Tags from the Dashboard. I've removed them from the Admin Menu and the meta boxes on the Edit Posts page from this question here: Remove Categories / Tags From Admin Menu
But now I'm trying to remove it from the All Posts page in the Dashboard where it shows a list of all the posts in a table and across the top are Title, Author, Categories, Tags, Date, etc. I can't seem to find how to do this.
Share Improve this question edited Apr 13, 2017 at 12:37 CommunityBot 1 asked Oct 5, 2015 at 22:41 erin_kerin_k 652 silver badges6 bronze badges3 Answers
Reset to default 2Just like @fatwombat suggested you need to rewrite the table. If you can't modify the @Milo solution, here is a snippet that will remove the columns:
function my_manage_columns( $columns ) {
unset($columns['categories'], $columns['tags']);
return $columns;
}
function my_column_init() {
add_filter( 'manage_posts_columns' , 'my_manage_columns' );
}
add_action( 'admin_init' , 'my_column_init' );
That actually requires you to rewrite the table itself.
The following link can help you with this: https://wordpress.stackexchange.com/a/19182/81482
If you want to completely remove categories and tags from post submenu, posts table and post edit page, you should simply unregister categories and tags for posts.
add_action('init', function() {
unregister_taxonomy_for_object_type('category', 'post');
unregister_taxonomy_for_object_type('post_tag', 'post');
});
本文标签: Remove Categories and Tags from Admin Dashboard
版权声明:本文标题:Remove Categories and Tags from Admin Dashboard 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736283382a1926951.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论