Support » Developing with WordPress » Posts for Certain Date as Front page?

  • Resolved damonw545


    Hi all,

    I’m using WordPress to manage a small weekly newspaper’s web site. Previously we had a static front page and then you would click on the “latest issue” link (created by wp_get_archives(‘type=daily&limit=1’);) to view the latest issue’s articles.

    Now I want the front page to show ONLY the posts from the date of the latest post… In other words, only the past week’s issue.

    Is there a way to do this? I’m stumped!

    Thank you,

Viewing 1 replies (of 1 total)
  • I DID IT!

    Here’s how:

    In home.php just before the loop:

    $fulldate=explode('-', get_lastpostdate());
    $day=explode(' ', $fulldate[2]);
    $day = $day[0];
    <?php query_posts("&year=$year&monthnum=$month&day=$day"); ?>

    [[THE LOOP]]

Viewing 1 replies (of 1 total)
  • The topic ‘Posts for Certain Date as Front page?’ is closed to new replies.