內容簡介
重要提示:請確保使用正確的外掛程式。
Next/Previous Post Link Plus 外掛程式適用於單篇文章模板。
Next/Previous Page Link Plus 外掛程式適用於頁面模板。
這兩個外掛程式名稱相似,但功能不同。如果誤裝了錯誤的外掛程式,那您將會收到「呼叫未定義的函數」錯誤訊息。如果您需要建立頁面的上一頁/下一頁連結,請參閱以下網址:
https://wordpress.org/extend/plugins/ambrosite-nextprevious-page-link-plus/
重要提示:本外掛程式不支援 PHP 4。如果您嘗試在 PHP 4 的主機上安裝它,您將會看到「剖析錯誤(parse error)」。從 WordPress 3.2 開始,官方已不再支援 PHP 4,因此您應該立即升級到 PHP 5.2。對於無法升級的使用者,您可以下載替代的 PHP 4 可用版本外掛程式,唯一和 PHP 4 版本不同的是,%category 變數不支援自定分類法。
http://www.ambrosite.com/download/ambrosite-nextprevious-post-link-plus.php4.zip
本外掛程式建立了兩個新的模板標籤:next_post_link_plus 和 previous_post_link_plus,它們是 WordPress 核心 next_post_link 和 previous_post_link 模板標籤的升級版本。新標籤包含核心標籤的所有功能,以及以下附加選項:
按除 post_date 之外的欄位(例如字母順序)排序上一篇/下一篇文章連結。
按自訂欄位排序上一篇/下一篇連結(支援字串和整數排序)。
完全支援 WordPress 3.3,包括自訂文章類型、自訂分類法和文章格式。
循環展示文章,當沒有下一篇時跳到第一篇,反之亦然。
索取首篇/末篇文章,而非前一篇/下一篇文章(用於第一篇/前一篇/下一篇/最後一篇導覽連結)。
在連結旁顯示文章縮略圖(WordPress 2.9 或更高版本)。
截短連結標題至指定長度,並於工具提示中顯示自訂文字。
顯示上一篇/下一篇連結的標題、日期、作者、類別和元值。
為 %date 變數指定自訂日期格式。
限定上一篇/下一篇連結的類別、分類法、文章格式、作者、自訂欄位值、自訂文章 ID 列表或自訂類別列表。
排除文章分類、自訂分類法、文章格式或個別文章 ID。
提供三種文章排除方式,用於更多的導覽控制。
索取多步下一篇/下N篇連結(例如,以 HTML 列表方式索取下 N 篇連結)。
傳回下一篇/上一篇連結的 ID、標題、日期、href 屬性或文章物件,而非顯示在螢幕上。
如果沒有找到下一篇/下一篇連結,傳回 false,以便佈景主題可以有條件地顯示替代文字。
與「文章排序」和其他熱門的文章重新排序外掛程式相容。
有關外掛程式配置的詳細文檔,請參閱以下網址:
http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress
外掛標籤
開發者團隊
② 後台搜尋「Ambrosite Next/Previous Post Link Plus」→ 直接安裝(推薦)
原文外掛簡介
IMPORTANT: Make sure you are using the right plugin.
Next/Previous Post Link Plus is intended for use in single post templates.
Next/Previous Page Link Plus is intended for use in page templates.
The two plugins have similar sounding, but different, function names. If you mistakenly install the wrong plugin, you will get a “call to undefined function” error. If you want to create next/previous links for your pages, please check out:
https://wordpress.org/extend/plugins/ambrosite-nextprevious-page-link-plus/
IMPORTANT: This plugin is not compatible with PHP 4. If you try to install it on a host running PHP 4, you will get a parse error. WordPress has officially ended support for PHP 4 as of version 3.2, so you should upgrade to PHP 5.2 now. For those who cannot upgrade, you can download the alternate PHP 4 compatible version of the plugin. The only difference with the PHP 4 version is that the %category variable will not work with custom taxonomies.
http://www.ambrosite.com/download/ambrosite-nextprevious-post-link-plus.php4.zip
This plugin creates two new template tags — next_post_link_plus and previous_post_link_plus — which are upgraded versions of the core WordPress next_post_link and previous_post_link template tags. The new tags include all of the functionality of the core tags, plus the following additional options:
Sort the next/previous post links on columns other than post_date (e.g. alphabetically).
Sort next/previous links on custom fields (both string and integer sorts are supported).
Full WordPress 3.3 compatibility, including support for custom post types, custom taxonomies, and post formats.
Loop around to the first post if there is no next post (and vice versa).
Retrieve the first/last post, rather than the previous/next post (for First|Previous|Next|Last navigation links).
Display post thumbnails alongside the links (WordPress 2.9 or higher).
Truncate the link titles to any length, and display custom text in the tooltip.
Display the title, date, author, category, and meta value of the next/previous links.
Specify a custom date format for the %date variable.
Restrict next/previous links to same category, taxonomy, format, author, custom field value, custom post ID list, or custom category list.
Exclude categories, custom taxonomies, post formats, or individual post IDs.
Three category exclusion methods for greater control over the navigation stream.
Return multiple next/previous links (e.g. the next N links, in an HTML list).
Return the ID, title, date, href attribute, or post object of the next/previous links, instead of echoing them to the screen.
Return false if no next/previous link is found, so themes may conditionally display alternate text.
Works with Post Types Order and other popular post reordering plugins.
Extensive documentation on configuring the plugin may be found here:
http://www.ambrosite.com/plugins/next-previous-post-link-plus-for-wordpress
