是否有任何使用分页过滤类别的解决方案。目前,它只过滤当前页面中的帖子,但现在不再过滤。你可以在这里看到:The Method Case
谢谢!
答案 0 :(得分:1)
您可以将WP_Query
用于此目的。例如:
<?php
$posts = WP_Query(array(
'category_name' => 'my-category',
'paged' => 2 // Page 2
));
while($posts->have_posts()): $posts->the_post();
// do some stuff
endwhile;
?>