Моя нумерация страниц пользовательского типа сообщений перенаправляется на домашнюю страницу, то же решение работает на странице блога.
inc/cpt.php:
Код: Выделить всё
register_post_type(
'casestudies',
array(
'labels' => array(
'name' => __('Case studies'),
'singular_name' => __('Case studie')
),
'public' => true,
'has_archive' => false,
'hierarchical' => false,
'show_in_rest' => true, // gutenberg support
'rewrite' => array(
'with_front' => false,
'slug' => 'case-studies'
),
// This is where we add taxonomies to our CPT
'taxonomies' => array( 'category' ),
'supports' => array(
'title',
'thumbnail',
'editor',
'excerpt',
'author'
)
)
);
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/78989736/wordpress-cpt-pagination-redirects-to-root[/url]