[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 22:36:09 UTC 2020


#50204: wp_query_reset seems to reset the loop and not the query
--------------------------+-------------------------------------
 Reporter:  elieobeid7    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  docs, coding-standards
--------------------------+-------------------------------------

Comment (by ravipatel):

 Use  wp_reset_query() to  wp_reset_postdata().

 https://developer.wordpress.org/reference/functions/wp_reset_postdata/

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50204#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list