doson1998 2015-08-29 16:51
浏览 50
已采纳

Wordpress Pagination在同一页面上显示帖子而不是新页面

I am just finishing off a custom wordpress theme, and was wanting to make a change to the way Pagination works in the index.php file. Currently when I click the pagination links it will take me to a new page, to display the other posts (assuming I have set in the settings for it to display less than the total number of posts). This is fine, however ideally I would like the posts to just pop up at the bottom, underneath the ones already there from the loop.

Currently I am using:

    <?php next_posts_link('Older Posts'); ?>
    <?php previous_posts_link('Newer Posts'); ?>

If I haven't explained this well enough let me know and I will try elaborate.

Thank you!

  • 写回答

1条回答 默认 最新

  • dongqiao9394 2015-08-30 16:38
    关注

    It sounds like you are looking for an method to load posts via ajax instead of a new page load. I use the JetPack Infinite Scroll extension. It should give you what you want but it can be rather difficult to setup for custom templates. Just follow the directions precisely.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Stata链式中介效应代码修改
  • ¥15 latex投稿显示click download
  • ¥15 请问读取环境变量文件失败是什么原因?
  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错