下面是我的代码:
register_taxonomy(\'koolitused\', \'koolitus\', array(\'label\' => __(\'Kategooriad\', \'Creativo\'),
\'query_var\' => true,
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
//\'supports\' => array( \'title\', \'editor\', \'thumbnail\' ),
\'hierarchical\' => true,
\'rewrite\' => array(\'slug\' => \'koolituste_kalender\', \'with_front\' => true),
\'has_archive\' => true) );
$slug = \'koolitus\';
$labels = array(
\'name\' => _x( \'Koolitused\', \'Post Type General Name\', \'Creativo\' ),
\'singular_name\' => _x( \'Koolitus\', \'Post Type Singular Name\', \'Creativo\' ),
\'menu_name\' => __( \'Koolitused\', \'Creativo\' ),
\'parent_item_colon\' => __( \'Parent Item:\', \'Creativo\' ),
\'all_items\' => __( \'Kõik koolitused\', \'Creativo\' ),
\'view_item\' => __( \'Vaata koolitust\', \'Creativo\' ),
\'view_items\' => __(\'Vaata koolitusi\', \'Creativo\'),
\'add_new_item\' => __( \'Lisa uus koolitus\', \'Creativo\' ),
\'add_new\' => __( \'Lisa uus\', \'Creativo\' ),
\'edit_item\' => __( \'Muuda\', \'Creativo\' ),
\'update_item\' => __( \'Uuenda koolitust\', \'Creativo\' ),
\'search_items\' => __( \'Otsi koolitust\', \'Creativo\' ),
\'not_found\' => __( \'Ei leitud\', \'Creativo\' ),
\'not_found_in_trash\' => __( \'Ei leitud prügikastist\', \'Creativo\' ),
\'filter_items_list\' => _x( \'Koolitus\', \'Post Type Singular Name\', \'Creativo\' ),
\'items_list_navigation\' => _x( \'Koolitus\', \'Post Type Singular Name\', \'Creativo\' ),
\'items_list\' => _x( \'Koolitus\', \'Post Type Singular Name\', \'Creativo\' ),
\'name_admin_bar\' => _x( \'Koolitus\', \'Post Type Singular Name\', \'Creativo\' ),
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'has_archive\' => true,
\'rewrite\' => array(\'slug\' => \'koolitus\'),
\'supports\' => array(\'title\', \'editor\', \'thumbnail\'),
\'can_export\' => true,
\'menu_icon\' => \'dashicons-book-alt\'
);
register_post_type(
\'koolitus\', $args
);
问题是我无法访问类别存档页,它给了我404。
我试着冲洗我的permalinks,什么都没有。我试着详细地四处看看,尝试了所有的解决方案,但没有任何效果。
我可以访问一个类别,例如:www.domain。com/koolituste\\u kalender/类别
但我无法访问存档页面www。科曼。com/koolituste\\u kalenderThis会给我找不到的第404页。
有什么想法吗?