我似乎无法得到分页在WordPress的工作。我已经尝试了几个星期开始下载,但它似乎是不可能的:(。它是可行的,在这种情况下,怎么样?分页与WordPress
这是我Wp_Query:
$all_posts = new WP_Query(array(
'posts_per_page' => 3,
));
这就是我如何将它输出:
if ($all_posts->have_posts()): while ($all_posts->have_posts()) : $all_posts->the_post();
// content rendered here
<?php endwhile; ?>
<?php endif; ?>
我看不到你给的代码片段任何分页代码。阅读https://codex.wordpress.org/Pagination – Rikesh