[wp-hackers] $wp_query Disappears after AJAX
Spencer
spencer.gurnk at gmail.com
Thu Apr 1 19:08:59 UTC 2010
Okay I had that idea and thought about posting the original $query_string so
I could retrieve it through my function. Then is there a way I can covert my
array of arguments to a query string to match the other format?
Thanks,
Spencer
On Thu, Apr 1, 2010 at 3:07 PM, Vinicius Massuchetto <
viniciusandre at gmail.com> wrote:
> On Thu, Apr 1, 2010 at 3:54 PM, Spencer <spencer.gurnk at gmail.com> wrote:
> > 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.
>
> Calling an AJAX request implies of having another timeline on page
> loading, like loading another page. AFAIK, it only posts something
> again to a webpage, needing new queries and stuff to be loaded if you
> need them.
>
> You can assign $_SESSION variables, or use the $_POST variables to
> load some info again if you need something pre-loaded for this AJAX
> request.
>
> Hope it helps.
> --
> Vinicius Massuchetto
> http://vinicius.soylocoporti.org.br
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list