[theme-reviewers] Requiring wp_reset_query() and wp_reset_postdata()

Chip Bennett chip at chipbennett.net
Tue Jan 29 13:49:35 UTC 2013


Yes, using wp_reset_query() after a query_posts() loop, or
wp_reset_postdata() after a WP_Query loop or a get_posts loop with
setup_postdata(), is part of proper implementation of these functions.

Also: see related discussion here regarding query_posts():
http://make.wordpress.org/themes/2012/12/14/query_posts/

Regards,

Chip


On Tue, Jan 29, 2013 at 8:40 AM, Kirk Wight <kwight at kwight.ca> wrote:

> Should we add to the guidelines requiring wp_reset_query() and
> wp_reset_postdata() if using query_posts and WP_Query respectively?
>
> Or maybe these are checks that could be added to the Theme Check plugin,
> so that upload would fail if they're not present?..
>
> _______________________________________________
> 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/20130129/59734b72/attachment-0001.htm>


More information about the theme-reviewers mailing list