Support » Requests and Feedback » Display Current Month Only

  • I have no idea if anyone has asked this question before …Is it possible to change the script, add script, or add external script, to have the initial visit display only the day’s post, or month’s postings? I cannot use plug-ins, so I will have to manually code or edit script. I believe that this is possible because I recoded a design which was using javascript to “pull” from ColdFusion. Or worse come to worse, if someone could point me to a link or thread which provides how to offer different starting pages, I would welcome that also. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I had the same issue… and this code seems to have met the requirements.

    you may want to try it out…

    <?php if ($posts) {
    $post = $posts[0];
    $latest_month = the_time(‘Yd’, false);
    echo "<h2>";
    echo the_time(‘F’).’ Edition’;
    echo "</h2>";
    $posts = query_posts($query_string . ‘&m=’.$latest_month);
    <?php foreach ($posts as $post) : start_wp(); ?>

    and after that anything that you normally had , holds good.

    Try it out.

    This code doesn’t work for me, although I also would like to have the current month that had posts as the startpage. My indexpage stays completely blank.

    I’m not so comfortable with php, but should’t the code try to gain the date (month) of the latest post instead of the actual month we’re in? Because if the actual month is februari 2005 it could well be empty, and the last post could have been made in januari.

    The code I posted is trying to get the month from the latest post, and not the current month.
    probably you need the complete index.php file., that you can just replace it with.

    let me know, if thats the case.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Current Month Only’ is closed to new replies.