Original Url: https://www.something.com/category/ftm-atf/
在中添加分页时,将生成以下url,结果为404:
Paginated Url: https://www.something.com/category/ftm-atf/page/2/
代码位于
category.php 如下所示:
<?php
$category = get_category( get_query_var( \'cat\' ) );
query_posts(array(
\'post_type\' => \'video\',
\'showposts\' => 6,
\'post_status\' => \'publish\',
\'tax_query\' => array(
array(
\'taxonomy\' => \'category\',
\'field\' => \'term_id\',
\'terms\' => array($category->term_id)
)
)
));
?>
<?php while (have_posts()) : the_post(); ?>
...
<?php endwhile;?>
paginate_links(array(\'total\'=> $wp_query->max_num_pages));
我尝试了各种各样的解决方案,但都无济于事,所以我觉得有些基本的东西被遗漏了。基本上,我所需要做的就是限制每页6篇文章,并允许简单分页。
非常感谢你!