Make WordPress Core

Opened 8 weeks ago

Last modified 5 days ago

#43176 new enhancement

Nav Menu Search - add filters for query args

Reported by: billerickson Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Menus Keywords: needs-patch
Focuses: ui, administration Cc:


On sites that have lots of content with similar names, it can be almost impossible to find the correct page using the search tab. One way to fix this is described in #38224 (changing the number of posts returned, or providing a filter so developers can change it).

Another option would be to check if the search query is_numeric(), and if so, search for a page with that ID. This could either be implemented in core directly, or appropriate filters could be provided so a plugin could implement this functionality.

Change History (1)

#1 @welcher
5 days ago

  • Keywords needs-patch added
  • Summary changed from Nav Menu Search - support search by ID to Nav Menu Search - add filters for query args

I don't think that implementing the is_numeric() check directly in core is the correct approach here. There will inevitably be a use-case where there is content that uses numbers in the title - making searching for it even more difficult.

However, having filters available to the developers to be able to implement a change like this and by extension potentially address some of the issues mentioned in #38224 would be great.

Note: See TracTickets for help on using tickets.