[wp-trac] [WordPress Trac] #52742: Searching injects a page ID into the loop if search term matches a page slug

WordPress Trac noreply at wordpress.org
Fri Aug 11 19:36:19 UTC 2023


#52742: Searching injects a page ID into the loop if search term matches a page
slug
--------------------------+------------------------------
 Reporter:  marcc1213     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  5.6.2
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------
Changes (by desrosj):

 * keywords:   => close


Comment:

 Hey @marcc1213,

 First, my apologies that this took a such a long time to receive a
 response.

 On to the issue itself. Are you still able to reproduce this? Could you
 provide some example code? The search page is not an actual page. Instead,
 it's more like an archive page, or any other psuedo page that lists
 multiple posts.

 It is expected behavior that functions intended for use with a loop to
 return the corresponding values for the first post in a result set outside
 of/prior to the loop.

 Going to mark this one with a `close` suggestion since this seems like
 expected behavior to me. I'll leave it open for a few weeks in case there
 is more to this report and the more details can be provided.

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


More information about the wp-trac mailing list