Make WordPress Core

Opened 2 years ago

#52742 new defect (bug)

Searching injects a page ID into the loop if search term matches a page slug

Reported by: marcc1213's profile marcc1213 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.6.2
Component: General Keywords:
Focuses: Cc:


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.

Change History (0)

Note: See TracTickets for help on using tickets.