我的解决方案分为三步:
1-第一个:安装此插件:https://wordpress.org/plugins/category-pagination-fix/
2-然后:用这种结构制造你的cod
<?php $paged = ( get_query_var( \'paged\' ) ) ? get_query_var( \'paged\' ) : 1; ?>
<?php
$q=new wp_Query(
array(
"posts_per_page"=>10,
"post_type"=>"",
"meta_key"=>"",
"orderby"=>"meta_value_num",
"order"=>"asc",
"paged" => $paged,
)
);
while($q->have_posts())
{
$q->the_post();
?>
<li></li>
<?php
}
wp_reset_postdata();
?>
<div class="pagination">
<?php
global $q;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
\'base\' => str_replace( $big, \'%#%\', esc_url( get_pagenum_link( $big ) ) ),
\'format\' => \'?paged=%#%\',
\'current\' => max( 1, get_query_var(\'paged\') ),
\'total\' => $q->max_num_pages
) );
?>
</div>
进入wordpress设置>阅读>博客每页最多帖子数,然后输入数字1