[wp-trac] [WordPress Trac] #28382: WP_Query - Main Query Flag
WordPress Trac
noreply at wordpress.org
Wed May 28 15:21:20 UTC 2014
#28382: WP_Query - Main Query Flag
-------------------------+------------------------------
Reporter: Howdy_McGee | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.9.1
Severity: normal | Resolution:
Keywords: | Focuses: template
-------------------------+------------------------------
Changes (by SergeyBiryukov):
* focuses: accessibility, administration, template => template
Comment:
Main query should be modified using
[http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
pre_get_posts] action. `WP_Query` should only be used for additional
queries.
`WP_Query` already has
[http://codex.wordpress.org/Function_Reference/is_main_query
is_main_query()] method, there is also a conditional function with the
same name.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28382#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list