Привет, у меня есть зарегистрированная страница таксономии пользователя
register_taxonomy(
'profession',
'user',
array(
'public' => true,
'labels' => $label,
'rewrite' => array(
'with_front' => false,
'slug' => 'profession' // Use 'author' (default WP user slug).
),
'query_var' => true,
//'exclude_from_search' => false,
'capabilities' => array(
'manage_terms' => 'edit_users', // Using 'edit_users' cap to keep this simple.
'edit_terms' => 'edit_users',
'delete_terms' => 'edit_users',
'assign_terms' => 'read',
),
'update_count_callback' => 'my_update_profession_count' // Use a custom function to update the count.
)
);
, и я добавляю пагинацию для страницы таксономии
echo paginate_links( array(
'base' => get_pagenum_link(1) . '%_%',
'format' => 'page/%#%/',
'current' => $paged,
'total' => $total_pages,
'prev_text' => '←',
'next_text' => '→',
'end_size' => 1,
'mid_size' => 1,
'type' => 'list',
) );
, когда получаю site.com/profession/term_name/page/ 2 это возвращает мне ошибку 404 site.com/profession/term_name/page/1 перенаправить на site.com/profession/term_name/ мой запрос пользователя
$args3 = array(
// 'role' => 'specialist',
'meta_key' => 'profession',
'meta_value' =>$term->ID,
'orderby' => 'like',
'order' => 'DESC',
'offset' => $offset,
'number' => $number,
'paged' => $paged,
'count_total' => true,
);
$user_query3 = new WP_User_Query($args3);