Did you know that when you’re using the search boxes on your WordPress site, you can narrow down the results by providing words that you don’t want included? That’s right! This method works both on the front end (theme-provided search bar, search widget, etc), as well as on the back end (post listing screens, etc), and is available since WordPress v4.4 All you need to do is prefix the words you don’t want included with a simple hyphen/dash “-“! For example, if you are searching on a WordPress website for chicken recipes, you’ll most probably type in the search box: chicken However, you get an overwhelming number of chicken soup recipes. Soup is definitely not what you’re looking for, so all you need to do is type: chicken -soup Great, but now you’re flooded by fried chicken recipes, and again, it isn’t what you’re looking for. Now sweat: chicken -soup -fried That’s all there is to it really! Just remember that WordPress searches the title, the content and the excerpt of each post, so if you exclude a word that exists in any of those places, the post will not be included in the results. Customizing the exclusion
Share This