我一直在尝试在某个类别的页面中显示所有帖子。这是我到目前为止所做的:
<?php
$args = array(
'category_name' => 'diy-tutorial',
'post_type' => 'post',
'posts_per_page' => 3
//'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
);
query_posts($args);
$x = 0;
while (have_posts()) : the_post(); ?>
它实际上是有效的,但它不会让我导航到类别的下一页例如,我在该类别中有 30 个帖子,所以我的代码每页会显示三个帖子,对吗?如果我更改每页显示的帖子数,则下一个>>链接不会显示得很好,它也不会工作......
如果您有其他显示方式,请告诉我。