我有一个自定义的帖子类型
// Set other options for Custom Post Type
$args = array(
\'label\' => __( \'document\', \'ecse\' ),
\'description\' => __( \'Upload Documents\', \'ecse\' ),
\'labels\' => $labels,
// Features this CPT supports in Post Editor
\'supports\' => array( \'title\', \'editor\', \'custom-fields\', \'excerpt\' ,\'thumbnail\',\'page-attributes\',\'tags\'),
// You can associate this CPT with a taxonomy or custom taxonomy.
\'taxonomies\' => array( \'sources\' ),
\'capability_type\' => \'page\',
我有自己的分类法
register_taxonomy( \'sources\',...[ ... \'has_archive\' => true,
\'rewrite\' => [
\'hierarchical\' => true,
"with_front" => false,
\'ep_mask\' => EP_PERMALINK | EP_PAGES,
\'slug\' => \'/%sources%/\'
register_taxonomy( \'forms\', \'documents\',[
\'has_archive\' => true,
\'hierarchical\' => true,
\'rewrite\' => [
\'hierarchical\' => true,
"with_front" => false,
\'ep_mask\' => EP_PERMALINK | EP_PAGES,
\'slug\' => \'/documents/%postname%/\'
],
\'show_in_menu\' => false,
\'query_var\' => true,
]);
我可以让归档页面显示文章类型的分页列表。。。。但单柱类型的永久链接格式不正确
我的分类permalink的基础是http://xxxx/documents/%sources%/
哪里sources 如果我使用http://xxxx/documents/%sources%/%postname%/
然后单页工作。。。。但我失去了“归档分页”功能http://xxxx/documents/%sources%/page/2/
不起作用。
如何使sinlge和archive页面都适用于自定义帖子类型?