[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
Tue Mar 9 21:43:44 UTC 2021
#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 | Keywords:
Focuses: |
--------------------------+-----------------------------
Create a page or post with a slug called "test".
Search for "test" using search form. Query string should be ?s=testing
The search page (search.php) will use that page ID in any functions
calling "get_the_ID()". Calling get_the_ID() on search.php returns the ID
of the page created above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52742>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list