Or configure it: ', $daysbefore = '3', $daysafter = '3', $mode='1', $yearsago = '1'′, $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?> or ', $daysbefore = '3', $daysafter = '3', $mode='2', $lastxyears = '2'′, $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?> or ', $daysbefore = '3', $daysafter = '3', $mode='3', $sinceyear = '2004'′, $limit = '5', $none= 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0'); ?> Customize display 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. License This plugin is free software; you can redistribute it and/or modify (without commercial purposes) it under the terms of the Creative Commons License (don't remove credits to author, please) You can view the full text of the license here: http://creativecommons.org/licenses/by-nc/2.5/ Changelog v.0.7 = All displayed in a single list with yearly sublists. NEW Feature: display date and/or excerpt. NEW Feature: added CSS markup to allow maximum flexibility on display. v.0.6.3 = Fixed a bug when calling get_old_posts(). v.0.6.2 = Fixed a bug when having & in post's title. Isolated repetitive code in its own function. Changes contributed by Mike Koepke. v.0.6.1 = Fixed bug when having quotes in post's title. Thanks to Mike Koepke for bug repporting and helping with fixing. v0.6 = Added 2 new modes, last X years and since year X. Corrected bug in $start_ago and $end_ago. v0.5.2 = XHTML valid. Lu�s P�rez (aka Cin�filo) v0.5.1 = Now the $yearsago parameter works. v0.5.01 = Now the limit option works, for real ;) v0.5 = First release. I decided to start on version 0.5 because of preserving version relation with �One year ago� plugin. Thanks Thanks to Borja Fernandez, Chris Goringe and Sven Weidauer for writing their plugins and to Luis P�rez and Mike Koepke for their contributions. */ function around_this_date ( $daysbefore = '3', $daysafter = '3', $mode = '1', $yearsago = '1', $lastxyears= '1', $sinceyear='2006', $limit = '4', $none = 'none', $showdate = '0', $dateformat = 'y', $showexcerpt = '0') { $outputlist = ''; // empty the 'outputlist' string $outputlist .= ''."\n"; echo "$outputlist"; } function get_old_posts( $start_ago, $end_ago, $limit, $none, $showdate, $dateformat, $showexcerpt ) { global $wpdb; $entries = $wpdb->get_results ("SELECT " . "ID, post_title, post_date, post_excerpt, post_content " . "FROM $wpdb->posts " . " WHERE post_status = 'publish' AND (( TO_DAYS( NOW() ) - TO_DAYS( post_date ) ) BETWEEN " . $end_ago . " AND " . $start_ago . ")". " ORDER by 'asc'" . " LIMIT $limit" ); $output = ''; // empty the 'output' string $output .= ''."\n"; return "$output"; } ?>