像这样的东西可能对你有帮助
$args = array(
\'end_size\' => 1,
\'mid_size\' => 1,
\'prev_next\' => false,
\'type\' => \'list\',
\'current\' => max( 1, get_query_var(\'page\') ),
\'total\' => $query->max_num_pages,
);
paginate_links($args);
在查询中定义
get_query_var(\'page\')
喜欢
\'paged\' => get_query_var(\'page\') ?: 1,