• I have products on my work website that has multiple ways of being searched. People can search it with a dash (ABC-123), without a dash (ABC123), with a space (ABC 123), etc. Is there some plugin that I can add a way for the built-in search to display that page with any of those? Right now, it’s just displaying “Sorry, no content matched your criteria.” and my boss is getting on my case about it.

    • This topic was modified 5 years, 10 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    There are a number of advanced search plugins you can try. I’m unsure if any offer the capability you seek. Part of the problem depends on what the data being searched looks like. If the data is ABC-123, it’s difficult for typical search code to correctly pre-process a search term like “ABC123”. The other way around is simple, data ABC123 can be found with “ABC-123” by stripping out all non-alphanumeric chars from search terms.

    More sophisticated matching as is needed in the first example would require the use of REGEXP() function in the SQL query, which is not something built into typical WP functions. Any plugins mentioning RegExp searching as a feature would certainly be worth a closer look.

    Thread Starter bree1818

    (@bree1818)

    Thanks bcworkz. I think I found a solution through Relevanssi search and using custom field “keywords” to input everything I want it to be able to search. It will mean a lot of time having to input all keywords exactly how I see people searching the website

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Internal Search and multiple keywords’ is closed to new replies.