我已经创建了自定义的帖子类型、分类法和类别。查看类别时,它似乎在使用索引。php并忽略WordPress模板层次结构。
任何想法为什么分类。php,类别-{id}。php等不适用于自定义帖子类型类别,但适用于常规帖子?
谢谢
add_action(\'init\', \'collegestampede_register\');
function collegestampede_register() {
$labels = array(
\'name\' => \'College Stampede\', \'post type general name\',
\'singular_name\' => \'Member\', \'post type singular name\',
\'add_new\' => \'Add New\', \'stampede item\',
\'add_new_item\' => \'Add New Member\',
\'edit_item\' => \'Edit Member\',
\'new_item\' => \'New Member\',
\'view_item\' => \'View Member\',
\'search_items\' => \'Search Member\',
\'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,
\'query_var\' => true,
\'menu_icon\' => get_stylesheet_directory_uri() . \'/article16.png\',
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'hierarchical\' => false,
\'has_archive\' => true,
\'menu_position\' => null,
\'supports\' => array(\'title\',\'editor\',\'thumbnail\',\'excerpt\',)
);
register_post_type( \'stampedemember\' , $args );
register_taxonomy("Location", array("stampedemember"), array("hierarchical" => true, "label" => "Location", "singular_label" => "Location", "rewrite" => true));