I have such a request:
$args = array( 'posts_per_page'=>1, 'paged' => ( get_query_var('page') ? get_query_var('page') : 1 ), 'post_type' => array('post-pressa','post-metro','post'), 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'items', 'field' => 'id', 'terms' => array( $term ) ), array( 'taxonomy' => 'category', 'field' => 'id', 'terms' => array( $city ) ), ) ); $query = new WP_Query($args); $max_num_pages = $query->max_num_pages; I bring pagination
<?php global $wp_query; $big = 999999999; $page_args = array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?page=%#%', 'current' => max( 1, get_query_var('page') ), 'total' => $max_num_pages ); ?> <?php echo paginate_links($page_args) ?> Links of pages are obtained with such www.mysite.ru/my_posts/page/2 and on this link the page gives 404 error
If you manually enter www.mysite.ru/my_posts?page=2 everything works correctly in the admin panel of the "permalinks" WordPress there are arbitrary links.
I tried differently including the option when format' => ''
The question is how to make the pagination work, or to read / page / 2 normally, or to give? Page = 2 but not to the detriment of the work of other ways on the site