Is it possible to have two separate wp-loops on one blog? This would make it more easy for me to display posts on different locations on my site, posts which does not belong tematic together.
Is it possible to have two separate wp-loops on one blog? This would make it more easy for me to display posts on different locations on my site, posts which does not belong tematic together.
Not sure exactly what you want to do, but it is certainly possible to have multiple loops on one page. Just do a search for WordPress WP_Query or query_posts and you should find plenty of examples.
Or if you could elaborate a little more I'll see if I can help.
I don't know what Thor's motivation for two loops is, but here's mine:
I'd like to set up one loop for "current" posts, and one loop for posts that are past an expiration date set in a custom field of each post.
I have no idea where to start on setting something like that up.
Thanks.
Thank you, Samboll. The multiple loops setup I understand pretty well. My major issue is that I don't know how to integrate the date from my custom field to dictate what appears in each of those two loops.
To clarify, I want each loop to do the following:
1st Loop: Display all posts that have not yet passed their expire date.
2nd Loop: Display all (or a set number of posts) that have passed their expire date.
This topic has been closed to new replies.