• Resolved gjhead

    (@gjhead)


    Howdy…

    I am hoping that someone can point me to a plug-in that will allow me to do the following. Otherwise, I hope that what I am asking will not cause too much customization:

    I want to change how posts are displayed on my home page. What I would like is to customize the home page of my WordPress blog to do the following when someone visits the page:

    1) Check to see what the LAST post date is.
    2) Display all (exerpts) from that day.

    Simple? Essentially, I just want my home page to be the archive page of the last post date. Can anyone help me out?

    Thanks in advance!

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

    (@gjhead)

    I got it. Here’s the final code:

    <?php
    $latest = $wpdb->get_var("SELECT post_date FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date DESC LIMIT 1");
    $latest = str_replace('-', '', substr($latest, 0, 10));
    // echo $latest;
    query_posts('m=' . $latest . '&showposts=-1');
    $wp_query->is_archive = false; $wp_query->is_home = true;
    ?>
Viewing 1 replies (of 1 total)

The topic ‘Posts by Post Date – Please Read!’ is closed to new replies.