我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Wordpress get_adjacent_post() - 跳过第一篇文章

I'm using the Wordpress get_adjacent_post() function to retrieve and return next and previous post data.

However I would like to always skip the first post, and have it loop back to the beginning. For example:

Post 0
Post 1
Post 2
Post 3
Post 4
Post 5

When viewing Post 1, it should show 'Post 5' as the previous post, rather than Post 0.

近期文章

  • 我怎样才能找到不仅仅是数组中的重复项,而是找到与PHP中的范围相匹配的数字?
  • PHP / MySQL:bind_param在准备语句中使用mysql函数时出现故障
  • 使用另一个表中的列适用的连接从多个表中进行选择?
  • Mysqli_fetch_array没有给出任何结果
  • 使用Net_SSH2 :: exec()的phplibsec环境变量
  • 替换数组PHP
  • 如何将PHP-Processing屏幕颜色设置为黑色(不要白屏)
  • nginx上的PHP exec函数无法识别系统环境变量
  • 糖crm无效包
  • 尽管更新URL,顺序cURL仍返回相同的内容
  • Git diff没有任何意义
  • 如何阻止一个preg替换阵列干扰另一个?
  • 列出没有数据库数据的月份
  • 通过php exec执行脚本,在服务器上创建一个文件
  • PHP管道电子邮件 - 从Body Array获取数据行
  • 停止表单刷新,但发布
  • 如何使用json_encode作为基于我的代码的json返回
  • 在iframe中嵌入wordpress admin
  • 将Ajax中的PHPvariable传递给Javascript,然后返回PHP
  • 为Fanduel类型的网站重复比赛的地方

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华