[wp-trac] [WordPress Trac] #50204: wp_query_reset seems to reset the loop and not the query
WordPress Trac
noreply at wordpress.org
Mon May 18 23:19:28 UTC 2020
#50204: wp_query_reset seems to reset the loop and not the query
--------------------------+-------------------------------------
Reporter: elieobeid7 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses: docs, coding-standards
--------------------------+-------------------------------------
Changes (by peterwilsoncc):
* status: new => closed
* resolution: => wontfix
* component: General => Query
* milestone: Awaiting Review =>
Comment:
As mentioned above, the purpose of
[http://developer.wordpress.org/reference/functions/wp_reset_query/
wp_reset_query()] is to reset any changes to the main query, otherwise
known as the loop.
To rewind the current query/loop to the first post requires calling
[http://developer.wordpress.org/reference/functions/rewind_posts/
rewind_posts()].
As these function have been in WordPress for a very long time, you are
correct that they're unlikely to change. As such, I'm going to close this
ticket wontfix.
Discussion can continue on a closed ticket, for further support on
customising the main loop or using this functions is best found in the
support forums as there are more people able to assist you in them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50204#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list