[wp-hackers] Loop Within A Loop

Nicolas Kuttler wp-hackers at nicolaskuttler.de
Tue Jul 20 20:36:00 UTC 2010

On Tue, Jul 20, 2010 at 03:46:59PM -0400, Devin Dixon wrote:
> The problem is, the class WP_QUERY automatically makes everything
> global. Is there a way where I can call the WP_QUERY object and
> retrieve it values without it affecting the other loop?

wp_reset_postdata() restores the global $post, if that's what you need


Nicolas Kuttler
wp at nkuttler.de

http://www.nicolaskuttler.de (deutsch)

More information about the wp-hackers mailing list