Home Plugins adjacent archive links
Adjacent Archive Links logo

Adjacent Archive Links

by Justin Watt on WordPress.org

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

(2)
This is an example of how it looks on a date archive page customized to only show post titles in chronological order.

This is an example of how it looks on a date archive page customized to only show post titles in chronological order.

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



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 “« %link” and next_archive_link defaults to “%link »“.

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

Active installations20+
Weekly downloads
13-18.75%
Version3.0
Last updated5/18/2015
WordPress version3.0
Tested up to4.2.38
Tags
archivearchivesdate archivesnavigationtemplate tag