DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

Here’s a nice idea to give a second life to your old posts: This code display automatically the posts you published exactly one year ago.

To achieve this recipe, simply paste the following code where you want posts published exactly one year ago to appear.

$current_day = date('j');
$last_year = date(‘Y’)-1;
if (have_posts()):
    while (have_posts()) : the_post(); 

One Comment

  1. Hi ! This hack was exactly what I wanted to do ! I use it on my blog for more than one year. Now I have a problem : since many months I don’t post anymore on a daily basis. This means my “One year ago” section is often empty.
    Could you help me out to find what would be the hack to display the last post before the date of “one year ago” ? With this method I could display a post everyday. 🙂

    Is there a “the_post_last()” hook or something?

Leave a Comment

Your email address will not be published. Required fields are marked *