I'm facing a challenge with a WordPress project and I would appreciate the community's help in solving it.
The issue lies with the search functionality. When customers type in a search term, such as "tooth," WordPress returns results that contain words like "toothmed" and "yellowtooth." However, I would like the search to be more precise and return only results with the exact term entered, not words that contain the term as part of them.
I believe this can be addressed using a hook that handles search results before they are sent to the database. I need this hook to remove wildcard characters (%) before and after the search terms, ensuring that results are displayed only when the searched term is bounded by word boundaries.
I appreciate any help or guidance you can provide to solve this issue. If anyone has experience with hooks or has encountered a similar situation, please share your expertise.
Thank you in advance for your cooperation!