Plugin / Around this date in the past…

Joan Junyent Tarrida



[ Notas en castellano en la web ] [ Notes en catala a la web ]

It shows around this date entries/posts in the past (if they exist). It is highly customizable. By default it retreives a week around the current day 1 year ago.

IMPORTANT: If your sidebar supports the new WordPress Widgets, you might better use the “Around this date in the past… – Widget Edition” plugin.
Check-it here:
[ ]


Place the function wherever you want to show the links.

You can call to function with default parameters:

    <?php around_this_date(); ?>

Or configure it:

    <?php around_this_date ($before = 'One year ago... ', $after = '<br />', $daysbefore = '3', $daysafter = '3', $mode='1', $yearsago = '1'′,  $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?>
    <?php around_this_date ($before = 'One year ago... ', $after = '<br />', $daysbefore = '3', $daysafter = '3', $mode='2', $lastxyears = '2'′,  $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?>
    <?php around_this_date ($before = 'One year ago... ', $after = '<br />', $daysbefore = '3', $daysafter = '3', $mode='3', $sinceyear = '2004'′,  $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?><h3>Configuration parameters</h3>
$before = Code will show before links. Defaults to ‘This week last year…: ‘
$after = Code will show after links. Defaults to ‘’
$daysbefore = Days’ posts that will show before one year ago. By default ‘3' (3 days before)
$daysafter = Days’ posts that will show after one year ago. By default ‘3' (3 days after)
$mode = Select the mode that you want the widget to work. By default ‘1' (X years ago)
    Mode 1: get posts around this date from X years ago.
    Mode 2: get posts around this date for the last X years.
    Mode 3: get posts around this date since year X.
$yearsago = It shows “X” years ago posts. By default ‘1' (1 year). ONLY IF MODE 1 IS SELECTED.
$lastxyears = It shows posts por the last "X" years. By default ‘1' (1 year). ONLY IF MODE 2 IS SELECTED.
$sinceyear = It shows posts since the year "X". By default ‘2005' (since year 2005). ONLY IF MODE 3 IS SELECTED.
$limit = Number of posts to retrieve. By default ‘4'. 
$none = Text shown when there are no posts. By default 'none'. 
$showdate = Show dates next to the links. ('0' or '1', by default '0', disabled)
$dateformat = Format of the date displayed next to the links (if checked). See 
$showexcerpt = Show the excerpt next to the links. ('0' or '1', by default '0', disabled).<h3>Customize display</h3>

In adition to the options avaliable in the function you can highly customize the apearance of the output by using CSS. These are the classes avaliable:
ul.atd-list {} // base list container.
li.atd-year {} // Yearly headers.
atd-yXXXX {} //yearly based class, eg. atd-y2006, atd-y2005 …
ul.atd-yearlylist {} // list container for each year around this date posts.
li.atd-entry {} // list items containing each around this date posts.
atd-yXXXX {} //yearly based class, eg. atd-y2006, atd-y2005 …
atd-mXX {} //montly based class, eg. atd-m01, atd-m02 … atd-m12.
atd-dXX {} //dayly based class, eg. adt-d01, atd-d02 … atd-d31.
atd-XXXXXXXX {} //date based class, eg. atd-20061205, atd-20050304 …
a.atd-entry-title {} // Link to the post.
.atd-entry-date {} // span containing the date, if $showdate enabled.
.atd-entry-excerpt {} // span containing the excerpt, if $showexcerpt enabled.


This plugin is released under the GPL license. See license.txt for details.

Credits and Acknowledgments

This plugin is based on:
– “One year ago” plugin released by Borja Fernandez
[ ]
– “Wayback” plugin realeaased by Chris Goringe
[ ]

Thanks to Borja Fernandez[ ] and Chris Goringe [ ] for writing those plugins and to Luis Pérez and Mike Koepke for their contributions.


Nothing else planed by now.


0 reviews

Rating breakdown

Details Information



First Released

16 Mar, 2007

Total Downloads


Wordpress Version

2.0 or higher

Tested up to:


Require PHP Version:



There is no tag found



The plugin hasn't been transalated in any language other than English.


The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.