Adjacent Archive Links

Adds two new template tags to output previous and next links on date archive pages.

Author:Justin Watt (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:4.2.2
Plugin version:3.0
Added to WordPress repository:26-11-2012
Last updated:18-05-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:http://justinsomnia.org/2012/11/adjacent-arch...
Total downloads:2 301
Active installs:20+
plugin download
Click to start download

After activating the plugin, you will have two new template tags at your disposal:

<?php previous_archive_link( 'format', 'link' ); ?>
<?php next_archive_link( 'format', 'link' ); ?>

They adapt their output depending on whether the date archive is a day, a month, or a year, and they will only output a link for an adjacent time period in which you have published posts. Both tags take two string parameters, format and link.

The format parameter defines what comes before and after the link. In it, %link will be replaced with whatever is declared in the link parameter below. previous_archive_link defaults to "&laquo; %link" and next_archive_link defaults to "%link &raquo;".

The link parameter defines the link text. Both tags default to "%date", the adjacent archive page's localized date.

If you're interested in contributing to the code behind this plugin, it's also hosted on GitHub: https://github.com/justincwatt/wp-adjacent-archive-links


Screenshots
FAQ
ChangeLog