Template tags (for use in single.php) to create post navigation loop (previous to first post is last post; next/after last post is first post).
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.
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.
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
Requires: 3.6 or higher
Compatible up to: 4.5.3
Last Updated: 3 months ago
Active Installs: 1,000+
1 of 1 support threads in the last two months have been marked resolved.
Got something to say? Need help?