Reply To: Exact match

#14945

Ernest Marcinko
Keymaster

Hi Francesco,

Well, there is no configuration to do that, as 'milano' will always match 'milano marittima'. But, there is a way to do that with a custom code. I've made a small code snippet for you, that will change the search query arguments and exclude post 16070 aka 'Transporter Sas' when the phrase is 'milano'.

Add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

IMPORTANT: Before making any direct changes in your site files, please make sure you have a back-up of everything. To edit the files, I highly recommend using an (s)FTP client, instead of the internal file editor in WordPress – as any tiny mistake there can potentially lead to a site error.

Let me know if you need help with this 🙂

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)