• I’ve seen people alluding to this in other threads, but so far nothing’s come of it.
    I need to display the most recent month’s worth of posts. Say we’re in November, it shows all of Novembers posts, but none of October’s (this is why I can’t just show posts from the last 30 days). Of course, if there are no posts for the current month, I need to be able to show the previous month’s posts.
    I’ve tried hacking things together, but my PHP isn’t quite where it should be. Has anyone done this?
    Many thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jeffmorgen

    (@jeffmorgen)

    Thanks, Beel… I tried that, but the script broke, giving me an unexpected “{“
    Just how should that be laid out within the Loop?

    Thread Starter jeffmorgen

    (@jeffmorgen)

    Okay, I got it to work – thanks Beel! – but how can we get it to show the most recent month’s posts even if there are no posts for the current month?
    Say the last time I posted was July, I still want to be able to show all of July’s posts on the front page, even if I’ve been a slacker and haven’t written in a while.
    Of course, in a perfect world, I’d write every day… ??

    I guess you could set a variable to 0 and add a counter within the loop you have created, if there are no posts it remains zero and in another section you could test if the variable=0 and if so, then show the most recent 5 posts, previous month, whatever.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Most recent month of posts’ is closed to new replies.