WordPress-Plugin: A Year Before

With »A Year Before« you can show the titles of the articles, which were written a certain time ago. So you can show in a »historical corner«, what happend in your blog e.g. 30 days, 6 months or a year before.


Download the plugin and unzip the folder <em>a-year-before</em> in the plugin-folder of your WordPress-installation. Then activate the plugin.

If you use a theme which supports wordpress-widget, then simply go to the widget-administration and pull the widget on the sidebar.

If you want to use the plugin by php-code, then open your template-file — e.g. the sidebar — where you can insert the following PHP-code:

<?php if (function_exists("ayb_posts")) { ?>
<div class="box">
<h2>Posts a year ago</h2>
<?php ayb_posts(); ?>
<?php } ?>

Configuration of the php-code

You can pass some parameters in this scheme
parameter1=value1&parameter2=value2&parameter3=value3 ...

You can use the following parameters

  • day : the number of days ago you want to show the articles.
  • month : the number of month ago you want to show the articles.
  • year : the number of years ago you want to show the articles.
  • before : piece of HTML to insert before the title of the articles. Default <li>
  • after: piece of HTML to insert after the title of the articles. Default </li>
  • showdate: shows the date (showdate=1) before every title or not (showdate=0)
  • dateformat : dateformat as used by PHP. Default ist the german shortform »d.m.y«
  • notfound: the text the plugin will output, if no article is found on the defined date.
  • range: number of days the plugin will search back in the future (relative to the values of day, month and year above) for an article. Meant as a „round about this day“-feature. Default 0
  • anniversary: if set to 1, the plugin will display all articles ever blogged with the same number of day and month. The parameters „day“, „month“, „year“ and „range“ will be ignored if used.


Shows the titles of the articles written 30 days ago without showing the date. The articles will not been showed as a HTML-list but simply seperated by a linebreak.

ayb_posts("month=6&day=14&notfound=Nothing blogged on this day.");
The titles of the articles written half a year and two weeks before, also showing the date . If there was no article written on that day, the output will be »Nothing blogged on this day.«

If you like CSS, you can style the date with the class ayb_date, the link of the article with the class ayb_link and the notfound-message by using the class ayb_notfound.



  • fix: due an issue with the gettext-function in PHP/Apache some server will output an warning/error-message. because of that error, the translations of the plugin will not longer work, but the plugin will.


  • anniversary-mode
  • range-parameter
  • Timezone-support
  • Bugfixes


  • Bugfix for sidebars not named „sidebar“


  • Widget-function added
  • Localization


  • XHTML-Bugfix (unnecessary span)
  • Bugfix PHP 5 Error with empty function-parameter


  • Bugfix for more tolerant date-values (e.g. day > 364). Thanks to AlohaDan for hinting and testing.


  • Adjustment for MySQL-versions older than MySQL 4.1.1


  • First public beta

Download (Version 0.7.1)

Pages: 1 2

Blogger, Podcaster, Webentwickler und freier Journalist

217 Kommentare

Hinterlasse einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.