[wp-hackers] how to check if current loop is main loop?
Andrew Nacin
wp at andrewnacin.com
Sat May 28 21:50:04 UTC 2011
---------- Forwarded message ----------
From: Konrad Karpieszuk <kkarpieszuk at gmail.com>
Date: Sat, May 28, 2011 at 3:54 PM
Subject: Re: [wp-hackers] how to check if current loop is main loop?
To: wp-hackers at lists.automattic.com
On Sat, May 28, 2011 at 9:28 PM, Christopher Ross <cross at thisismyurl.com>
wrote:
> I assume this is in your own theme
no :( i am creating plugin which i want to publish for all. so i
wanted to make this most universally and avoid to ask people who will
install this to put special template tag in theme.
To check if you're on the main loop: $wp_the_query === $wp_query
More information about the wp-hackers
mailing list