我已經註冊了一個自定義後類型:的WordPress 4.1:自定義文章類型將不會加載,鏈接不工作
<?php
register_post_type('my_cpt_fiction',
array(
'labels' => array(
'name' => __('Custom Posts')
, 'singular_name' => __('Custom Post')
, 'add_new' => 'Add New'
, 'add_new_item' => 'Create a new Custom Post'
, 'edit' => 'Edit Custom Post'
, 'edit_item' => 'Edit Custom Post'
, 'new_item' => 'Create a new Custom Post,'
, 'view_item' => 'View Custom Post,'
, 'search_items' => 'Search Custom Post'
, 'not_found' => 'No Custom Posts found'
, 'not_found_in_trash' => 'No Custom Posts found in trash'
),
'public' => true
, 'has_archive' => true
, 'supports' => Array(
'title' => 'title'
, 'editor' => 'editor'
, 'author' => 'author'
, 'comments' => 'comments'
)
, 'show_ui' => true
, 'rewrite' => array('slug' => 'my_custom_post' , 'with_front' => false, 'feeds' => true)
, 'capability_type' => array('my_custom_post','my_custom_posts')
, 'map_meta_cap' => true
, 'taxonomies' => array('category')
, 'publicly_queryable' => true
, 'exclude_from_search' => false
, 'query_var' => true
)
);
我沒有分類。
這添加到菜單中,我可以創建和編輯。但是,當我訪問到自定義帖子的鏈接時,它不會加載,而是看到主要的靜態主頁。
我已經嘗試過許多不同的永久鏈接組合,或者沒有永久鏈接。
我也似乎無法找到具體地表示,好像它是一個職位或頁面自定義後類型的任何信息,人們只是認爲它必須努力...
任何幫助,將不勝感激。
/J