[theme-reviewers] Custom Queries

Chip Bennett chip at chipbennett.net
Thu Sep 2 16:12:20 UTC 2010


Exactly what I needed. Thanks!

Chip

On Thu, Sep 2, 2010 at 11:10 AM, Austin Matzko <austin at pressedcode.com>wrote:

> On Thu, Sep 2, 2010 at 11:04 AM, Chip Bennett <chip at chipbennett.net>
> wrote:
> > If a Theme adds the following in, e.g., the sidebar, does a reset_query()
> > need to be called?
> >
> > $my_query = new WP_Query
> >
> > Or is a reset not necessary, since the query is called via custom
> variable?
>
> No, it's not necessary and won't do anything.
>
> wp_reset_query() affects only the global instantiation of WP_Query in
> $wp_query.  In this case, since WP_Query has been instantiated in
> $my_query, global variable $wp_query doesn't need to be reset.
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20100902/324aaddf/attachment.htm>


More information about the theme-reviewers mailing list