Здравствуйте, создаю кастомный тип поста
register_post_type('wiki', array(
'labels' => array(
'name' => 'WIKI', // Основное название типа записи
'singular_name' => 'WIKI', // отдельное название записи типа Book
'add_new' => 'Add WIKI',
'add_new_item' => 'Add a new WIKI',
'edit_item' => 'Edit WIKI',
'new_item' => 'New WIKI',
'view_item' => 'View WIKI',
'search_items' => 'Find WIKI',
'not_found' => 'WIKI not found',
'not_found_in_trash' => 'No WIKI found in the basket',
'parent_item_colon' => '',
'menu_name' => 'WIKI',
),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'menu_icon' => 'dashicons-welcome-learn-more',
'taxonomies' => array( 'wiki-categories', 'post_tag' ),
'show_in_rest' => true,
'supports' => array('title','editor','thumbnail')
) );
// Добавляем древовидную таксономию 'genre' (как категории)
register_taxonomy('wiki-categories', array('wiki'), array (
'labels' => array(
'name' => ( 'WIKI categories' ),
'singular_name' => ( 'WIKI categories' ),
'search_items' => ( 'Search for WIKI' ),
'all_items' => ( 'All WIKI' ),
'edit_item' => ( 'Change WIKI' ),
'update_item' => ( 'Update WIKI' ),
'add_new_item' => ( 'Add a new WIKI' ),
'new_item_name' => ( 'New category name' ),
'menu_name' => ( 'WIKI category' ),
),
'show_in_rest' => true,
'hierarchical' => true,
));
Создаю пост и присваиваю кастомную категорию, но на странице поста в url присваивается категория из обычного типа поста
То есть ожидаю www.site.ru/wiki/how-remove/название-поста/
Но сейчас так www.site.ru/wiki/education/название-поста/
education это переименованная "Без рубрики" - обычная стандартная категория у постов post_type - post