0
我在我的主题创建新的岗位类型,但是当我试图去了永久的职位,它给我的帖子没有发现注册自定义后类型WordPress的
function my_post_type_news() {
register_post_type('news',
array(
'label' => __('News'),
'public' => true,
'show_ui' => true,
'show_in_nav_menus' => false,
'menu_position' => 5,
'rewrite' => array(
'slug' => 'news',
'with_front' => FALSE,
),
'supports' => array(
'title',
'thumbnail',
'editor',
'excerpt')
)
);
register_taxonomy('news_category', 'news', array('hierarchical' => true, 'label' => 'News Categories', 'singular_name' => 'Category', "rewrite" => true, "query_var" => true));
}
add_action('init', 'my_post_type_news');
啊好的你是对的..谢谢 – OSos 2013-02-25 09:01:39
但为什么?你能向我解释一下吗? – OSos 2013-02-25 09:04:06