The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End most recent post from each selected categories

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #24866


    I am using the following code on my static home page outside of my wordpress installation. This is working great, I have it set to grab the 3 most current posts (from all categories) from my blog. However, I wonder if anyone can help me figure out how to have it only grab the 1 most current post in each of 3 select categories – still resulting in 3 excerpts but only the most recent from each of 3 select categories.


    The url is:



    Hi Chris,

    I don’t have a quick answer for you. Here’s some info that may help you figure it out:

    The code you supplied is the WordPress Loop that spits out the content of your posts. The Posts that you display is actually requested earlier.

    You should be able to add an if statement inside the loop like this:


    You’ll have to customize it to look for a variable that is only set if that category has already been filled up… make sense?

    You could probably do three separate "Loops" that only spit out one post, and make sure that post is from a certain category.

    I hope that points you in the right direction.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.