[wp-trac] [WordPress Trac] #20227: query_posts and is_archive conflicts
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 13 11:54:54 UTC 2012
#20227: query_posts and is_archive conflicts
--------------------------+----------------------
Reporter: nhuja | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: invalid
Keywords: |
--------------------------+----------------------
Comment (by dd32):
To explain the above..
The behavior you're seeing is correct. `query_posts()` '''replaces''' the
current page query, this affects all query flags, post contents, and any
other request-context there is. Creating a new WP_Query instance however
(or using `get_posts()`), keeps all those properties contained to the
instance of WP_Query.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20227#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list