• Resolved damonw545

    (@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,
    Damon

Viewing 1 replies (of 1 total)
  • Thread Starter damonw545

    (@damonw545)

    I DID IT!

    Here’s how:

    In home.php just before the loop:

    <?php 
    
    $fulldate=explode('-', get_lastpostdate());
    $year=$fulldate[0];
    $month=$fulldate[1];
    $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.