admin管理员组文章数量:1323355
I have created the custom post type but it is showing the posts categories in my created custom post type category.
I don't want to show the posts categories in my created custom post type category.
Here is my code added in functions.php
:
function create_posttype() {
register_post_type( 'vm_news',
array(
'labels' => array(
'name' => __( 'News' ),
'singular_name' => __( 'News' ), //in the horizontal bar when you are logged in.
'add_new' => __('Add news'),
'add_new_item' => __('New news'),
'edit_item' => __('Edit news'),
'new_item' => __('New news'),
'view_item' => __('Show all news'),
'search_items' => __('Search news'),
'not_found' => __('No news found'),
'not_found_in_trash' => __('No news found in trash'),
'parent_item_colon' => '',
'menu_name' => 'News'
),
'public' => true,
'has_archive' => false,
'show_in_menu' => true,
'show_ui' => true,
'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields'),
'rewrite' => array(
'slug' => 'news',
'with_front' => false
),
'taxonomies' => array('topics', 'category' )
)
);
}
// Hooking up our function to theme setup
add_action( 'init', 'create_posttype' );
Any help is much appreciated.
本文标签: Posts Categories Are Showing In The Custom Post Type Category
版权声明:本文标题:Posts Categories Are Showing In The Custom Post Type Category 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742130852a2422150.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论