开发者

How to add pagination in WordPress?

开发者 https://www.devze.com 2023-01-09 11:04 出处:网络
How can I enable WordPress pagination on my home page? I have limited the number 开发者_JAVA技巧of posts shown in the page. Do I need to put any code to show the pagination?try using something similar

How can I enable WordPress pagination on my home page? I have limited the number 开发者_JAVA技巧of posts shown in the page. Do I need to put any code to show the pagination?


try using something similar to:

<div class="navigation">
  <div class="alignleft"><? next_posts_link('&laquo; Previous') ?>
  </div>
  <div class="alignright"><? previous_posts_link('Next') ?>
  </div>
</div>


Frabiacca has it right.

<?php next_posts_link($label , $max_pages); ?>
<?php prev_posts_link($label , $max_pages); ?>

Also remember that previous is actually WP speak for newer posts not older posts. can be a little confusing.

0

精彩评论

暂无评论...
验证码 换一张
取 消