內容簡介
標準的 WordPress 模板標籤用於文章導覽(next_post、previous_post、next_post_link 和 previous_post_link)沒有提供這種功能,如果沒有文章,就什麼都不返回。而這款外掛就改變了這一點。
注意!這款外掛只能在單個文章頁面(single post pages)上使用(而且不需要修改您的模板)。
您可以在這裡找到這個外掛的主頁面並留下評論。
用法
plr_[next|previous]_post_link(‘format’, ‘link’, ‘in_same_cat’, ‘excluded_categories’)
範例
如果當前文章後面還有文章,則顯示“下一篇文章標題 →”作為鏈接,如果當前文章是最新文章,則顯示“下一篇文章:”作為純文本。
參數
這款外掛使用與 next_post 和 previous_post WordPress 函数相同的參數和格式。更多關於這些函數的信息,請瀏覽codex。
外掛標籤
開發者團隊
原文外掛簡介
The standard WordPress template tags used for post navigation (next_post, previous_post, next_post_link, and previous_post_link) don’t offer this functionality, leaving you with nothing returned if there isn’t a post. This plugin changes that.
NOTE!!! This plugin only works (without a hack in your template) on single post pages.
You can find the plugin home page (and leave comments) here.
Usage
plr_[next|previous]_post_link(‘format’, ‘link’, ‘in_same_cat’, ‘excluded_categories’)
Example
This would show “Next Post Title →” as a link if there was a post that came after the currently-viewed post, or “next post:” as plain text if the current post is the most recent.
Parameters
This plugin uses the same parameters and format as the next_post and previous_post WordPress functions. For more info on these functions, please visit the codex.
