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