获取下一个/上一个“照片页面”来自 WordPress
虽然有以下功能:
get_next_post();
next_image_link();
但这些功能都不能用于帮助为博客中的照片页面提供前向和后向链接。我知道我可以访问下一张照片,因为 WordPress 的 header.php
中有以下内容,
<!-- RSS & Pingbacks -->
...
<link rel='index' title='HugoPip' href='http://www.something.com' />
<link rel='start' title='Hello world!' href='http://www.something.com/?p=1' />
<link rel='prev' title='Driving Like a BOSS' href='http://www.something.com/?photo=driving-like-a-boss' />
<link rel='next' title='MegaCuts' href='http://www.something.com/?photo=megacuts' />
这些内容是在 wp-include/default-filters.php
中的某处声明的我能看出来。我只是不知道如何访问它们。任何帮助将不胜感激。
While there are functions like:
get_next_post();
next_image_link();
none of these can be used to help provide forwards and backwards links for photo pages in a blog. I know I can access the next photo in line because wordpress has the following in it's header.php
<!-- RSS & Pingbacks -->
...
<link rel='index' title='HugoPip' href='http://www.something.com' />
<link rel='start' title='Hello world!' href='http://www.something.com/?p=1' />
<link rel='prev' title='Driving Like a BOSS' href='http://www.something.com/?photo=driving-like-a-boss' />
<link rel='next' title='MegaCuts' href='http://www.something.com/?photo=megacuts' />
these are declared somewhere in wp-include/default-filters.php
from what I can make out. I just don't know how to access them. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了我正在寻找的东西:
I found what I was looking for: