Linux 软件免费装
Banner图

Loop Post Navigation Links

开发者 coffee2code
更新时间 2020年8月27日 15:28
捐献地址: 去捐款
PHP版本: 4.9 及以上
WordPress版本: 5.5
版权: GPLv2 or later
版权网址: 版权信息

标签

posts links navigation portfolio coffee2code next previous previous_post_link next_post_link

下载

2.6.1 1.0 1.5 1.6 1.6.1 1.6.2 1.6.3 2.0 2.5 2.5.1 2.5.2 2.6 3.0 3.0.1 3.0.2

详情介绍:

This plugin provides two template tags for use in single.php to create a post navigation loop, whereby previous to the first post is the last post, and after the last post is first post. Basically, when you're on the last post and you click to go to the next post, the link takes you to the first post. Likewise, if you're on the first post and click to go to the previous post, the link takes you to the last post. The function c2c_next_or_loop_post_link() is identical to WordPress's next_post_link() in every way except when called on the last post in the navigation sequence, in which case it links back to the first post in the navigation sequence. The function c2c_previous_or_loop_post_link() is identical to WordPress's previous_post_link() in every way except when called on the first post in the navigation sequence, in which case it links back to the last post in the navigation sequence. Useful for providing a looping link of posts, such as for a portfolio, or to continually present pertinent posts for visitors to continue reading. If you are interested in getting the post itself and not just a link to the post, you can use the c2c_get_next_or_loop_post() and c2c_get_previous_or_loop_post() functions. If you just want the URL to the post, you can use c2c_get_next_or_loop_post_url() and c2c_get_previous_or_loop_post_url(). Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

安装:

  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically wp-content/plugins/).
  2. Activate the plugin through the 'Plugins' admin menu in WordPress.
  3. Use c2c_next_or_loop_post_link() template tag instead of next_post_link(), and/or c2c_previous_or_loop_post_link() template tag instead of previous_post_link(), in your single-post template (e.g. single.php).

升级注意事项:

3.0.2 Trivial update:minor tweaks that should go unnoticed, restructured unit test file structure, added a TODO.md file, and noted compatibility through WP 5.5+. 3.0.1 Trivial update: Updated a few URLs to be HTTPS and noted compatibility through WP 5.4+. 3.0 Revival update: added functions for getting URL of previous/next post, modernized unit tests, added CHANGELOG.md, changed plugin initialization, updated compatibility to be WP 4.9-5.3+ updated copyright date (2020), and much more. See changelog for potential breaking change to a filter. 2.6.1 Trivial update: improved support for localization, minor unit test tweaks, verified compatibility through WP 4.4+, and updated copyright date (2016) 2.6 Recommended minor update: Added new template tags for getting the adjacent or looped post object; minor bug fixes; noted compatibility through WP 4.3+ 2.5.2 Trivial update: noted compatibility through WP 4.1+ and updated copyright date (2015) 2.5.1 Trivial update: noted compatibility through WP 4.0+; added plugin icon. 2.5 Major update: added support for navigating by taxonomy; added non-echoing versions of functions, and more filters; added unit tests; noted compatibility through WP 3.8+; dropped compatibility with WP older than 3.6 2.0 Recommended major update: synced with changes made to WP; added filters; changed arguments to existing filters; renamed and deprecated all existing functions and filters; noted compatibility through WP 3.5+; and more. (All your old usage will still work, though) 1.6.3 Trivial update: noted compatibility through WP 3.4+; explicitly stated license 1.6.2 Trivial update: noted compatibility through WP 3.3+ and updated copyright date 1.6.1 Trivial update: noted compatibility through WP 3.2+ and updated copyright date 1.6 Minor update. Highlights: adds 'rel=' attribute to links; minor tweaks; verified WP 3.0 compatibility.

更新日志:

3.0.2 (2020-08-26) Highlights: This minor update has some minor tweaks that should go unnoticed, restructures unit test file structure, adds a TODO.md file, and notes compatibility through WP 5.5+. Details: 3.0.1 (2020-05-10) 3.0 (2020-01-28) Highlights: Details: Full changelog is available in CHANGELOG.md.