[wp-hackers] $wp_query Disappears after AJAX

Spencer spencer.gurnk at gmail.com
Thu Apr 1 18:54:26 UTC 2010

Hey everyone,

I'm not sure if this is a bug, or I'm doing something completely wrong, but
I'm in a bit of a pickle.

I'm trying to merge an array of arguments (that I created) with the original
$wp_query->query array. It's fine the first time it loads (just calling the
function directly), but then once it gets updated with AJAX (the same
function is called through add_action( 'wp_ajax_callback', 'callback' );),
the $wp_query variable seems to disappear. Any ideas why that would make it
mess up?

I've tried everything I can think of. I've tried making temporary versions
of $wp_query and restoring it, wp_reset_query, and a million combinations of
other things.


More information about the wp-hackers mailing list