Loop Post Navigation Links
- Author:Scott Reilly
- Version:1.0
- Last update:21 April 2008
- Compatibility:WP 2.2+, 2.3+ and 2.5+
- Comments:go here
- Download:[ zip ]
- Description:
Adds next_or_loop_post_link() and previous_or_loop_post_link() template tags to loop back to the beginning/end post when at the end/beginning post single page.
-
-
Extended Description
next_or_loop_post_link()is identical to WordPress’snext_post_link()in every way except when called on the last post in the sequence, in which case it links back to the first post in the sequence.previous_or_loop_post_link()is identical to WordPress’sprevious_post_link()in every way except when called on the first post in the sequence, in which case it links back to the last post in the 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.
Installation
Download the file loop-post-navigation-links.zip and unzip it into your wp-content/plugins/ directory. Activate the plugin through the ‘Plugins’ admin menu in WordPress. Usenext_or_loop_post_link()template tag instead ofnext_post_link(), and/orprevious_or_loop_post_link()template tag instead ofprevious_post_link(), in your single-post template (single.php).-
Examples
<div class="navigation"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> </div>
Release Log
21 Apr 2008 : v1.0 — Release notes.
Copyright & Disclaimer
Copyright © 2008 by Scott Reilly (aka coffee2code)Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Acknowledgements
Thanks to all those who have contributed feedback and support!