Adds two new template tags to output previous and next links on date archive pages.
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,
will be replaced with whatever is declared in the link parameter below.
defaults to "
« %link" and
next_archive_link defaults to "
The link parameter defines the link text. Both tags default to "
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
Requires: 3.0 or higher
Compatible up to: 4.2.9
Last Updated: 1 year ago
Active Installs: 50+
Got something to say? Need help?