3
我創建了一個自定義後類型 - 新聞 - 使用的functions.php下面的代碼:該職位類型爲什麼我的自定義帖子類型帖子不顯示?
// Press Custom Post Type //
function press_custom_init() {
$labels = array(
'name' => _x('Press', 'post type general name'),
'singular_name' => _x('Press', 'post type singular name'),
'add_new' => _x('Add New', 'press'),
'add_new_item' => __('Add New Press Item'),
'edit_item' => __('Edit Item'),
'new_item' => __('New Press Item'),
'view_item' => __('View Press Item'),
'search_items' => __('Search Press'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => false,
'query_var' => true,
'rewrite' => array('slug','pages'),
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 5,
'supports' => array('title','editor','thumbnail','excerpt',)
);
register_post_type('press' , $args);
}
add_action('init', 'press_custom_init');
我已經加入項目,並新增了菜單項到我的導航欄,但是當我點擊鏈接,我收到'找不到帖子'的消息。
你可以在這裏看到:http://s13.mynewsitereview.com//press
請幫幫忙!
您刷新了固定鏈接設置嗎? – fuxia 2012-07-24 06:05:59