diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)



One of the interesting things of WP 1.5 is the ability to rerun The_loop again in the same template. The main way to do this is to execute a rewind_posts(); after the_loop. This will reset the post counter so that you can make another loop round.

The slightly more interesting way to use multiple loops is to make use of query_posts(). What this basically does is reinitialises the query object. The clever thing about this function is that you can pass it parameters to make it a totally different query. We can, for example, make the second loop fetch back only posts in the ‘shorts’ category.

Query, Posts, Reference, Code

Share This Story, Choose Your Platform!

Get Latest News

Subscribe to Digital News Hub

Get our daily newsletter about the latest news in the industry.
First Name
Last Name
Email address
Secure and Spam free...