Display text instead of nothing if there isn't a next or previous post for the currently-displayed post.
Author: | Keith Solomon (profile at wordpress.org) |
WordPress version required: | 2.1 |
WordPress version tested: | 6.0 |
Plugin version: | 1.0 |
Added to WordPress repository: | 06-01-2008 |
Last updated: | 11-05-2022 |
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | http://keithsolomon.net/ |
Total downloads: | 1 949 |
Click to start download |
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.