I have a jQuery slider at the top of my index.php, which works fine. The only problem is that I would like to use query_posts to only display the latest post from five different categories, and always show one from each.
So when a new post is created in, lets say the category interview, this will be displayed. But the interview post which was posted one day earlier will then not be displayed, but the latest post from the four other categories are still there.
I think this is a bit complicated, no?
query_posts()
for a secondary loop, such as a posts slider, especially onindex.php
. Usingquery_posts()
is intended only for the primary Loop. Useget_posts()
orWP_Query()
instead, for secondary loops.query_posts()
Codex entry regarding usage caveats.