定义分页属性:

$author_first_page = isset( $_GET['author_first_page'] ) ? (int) $_GET['author_first_page'] : 1;

开始自定义查询:

$author_first_producer_args = array(
        'post_type' => 'project',
        'posts_per_page' => 10,
        'paged' => $author_first_page,
        'meta_query' => array(
            'relation' => 'AND',
            'state_clause' => array(
                'key' => '_project_first',
                'value' => get_the_author_meta('display_name', get_queried_object_id()),
                'compare' => 'IN',
            ),
        ),

    );

    $author_first_producer_query = new WP_Query($author_first_producer_args);

分页导航部分设置:

$pag_args1 = array(
            'format'  => '?author_first_page=%#%',
            'current' => $author_first_page,
            'total'   => $author_first_producer_query->max_num_pages,
            'prev_text' => '<',
            'next_text' => '>',
        );
        echo paginate_links( $pag_args1 );