Imagine your visitors are searching for something on your website. They type in a word, but the website uses a different word for the same thing, and users get no results.
It can be annoying, right?
This happens with WordPress search. The default search is okay, but it is not very smart about words that mean the same thing. For example, if someone searches for ‘automobile’ on your site, but you use ‘cars,’ then they might miss some of your great content.
That’s why using synonyms in WordPress search provides a great user experience. Users can find what they need, even if they use slightly different words. And the easiest way to do that is by using a plugin like SearchWP.
In this article, we’ll show you how to set up synonym rules for WordPress search.
Why Include Synonyms in WordPress Search?
Synonyms are simply words that mean the same or almost the same thing. For instance, ‘big’ and ‘large’ are synonyms of each other, just like ‘fast’ and ‘quick’ can be used interchangeably.
When WordPress search understands synonyms, it’s like it understands different names for the same content on your website.
Why is this important for your WordPress site?
Well, people search using different words. If someone searches for ‘pictures’ but you only use the word ‘images’ on your site, then they might not find what they are looking for.
But if your search knows that pictures and images are synonyms, then it will show them the right results. This is a good thing for several reasons.
When people find what they need more easily, it makes them happy and encourages them to stay on your site longer. They might even become long-term customers or regular readers. Plus, it also makes your website content easier to discover.
That said, let’s look at how you can allow WordPress search to include synonyms.
Setting Up Synonyms Rule in WordPress Search
The default WordPress search doesn’t understand synonyms and won’t know if two words mean the same thing. It is also not that great at finding content on your site because it doesn’t include other key elements like categories, tags, custom fields, product details, documents, and more in the search process.
This is where SearchWP comes in handy. It is the best search plugin for WordPress and you can easily include different synonyms for search terms.
Plus, it lets you customize WordPress search by creating your own search engine and including different sources. You can also include custom fields, taxonomies, product details like SKUs, and much more to enhance the search experience on your site.
You can start by visiting the SearchWP website and signing up for an account.
After you’ve subscribed to a pricing plan and created a new account, the next step is to download the plugin files.
You can find the plugin by logging into your SearchWP account area. Simply go over to the ‘Downloads’ tab and click the ‘Download SearchWP’ button.
Next, you will need to log into your WordPress admin area and upload SearchWP to your site.
If you need help, then you can follow this guide on how to install a WordPress plugin.
From here, you will see the SearchWP welcome screen and setup wizard. Go ahead and click the ‘Start Onboarding Wizard’ button and follow the onscreen instructions.
You’ve now fully set up the SearchWP plugin on your WordPress site. The next step is to customize your site’s search engine and synonyms for your search terms.
First, you will need to go to SearchWP » Algorithm from the WordPress dashboard and then switch to the ‘Global Rules’ tab.
You can then click the ‘Add New’ button under the Synonyms section.
From here, simply enter the Search Terms and their respective Synonyms.
When entering synonyms, think about the words people use to search for things on your site.
For example, if you sell clothes, then you might use words like shirt, tee, or T-shirt. Or if you write about cooking on a food blog, then you could use synonyms like ‘recipe’ for cooking instructions or food preparation.
Note: The SearchWP synonym feature currently works with only single words, such as ‘shirt’ or ‘investigation’. It doesn’t work with multiple words or phrases right now. So when you’re setting up a synonym rule, please ensure that you only enter a specific term.
Change the Default WordPress Search Settings
The default WordPress search works fine for some websites, but it’s far from perfect. If your website has a ton of content or your online store has loads of products, then you might need to change the default search settings.
With SearchWP, you can easily customize your WordPress search without editing code. The best part about using SearchWP is that it supports multiple search engines on 1 site. This way, you can create different search engines, allowing your users to search for things in different ways in different site locations.
First, you will need to go to SearchWP » Algorithm from the WordPress dashboard. After that, you can click the ‘Sources & Settings’ button.
Next, you’ll see a new window with the default sources for the search engine, which include posts, pages, and media.
You can simply select which sources SearchWP should consider when finding content or products on your site. For example, if you want to limit search to specific post types, then you can only choose ‘Posts’ as the source.
When you’re finished, simply click the ‘Done’ button.
After that, you can choose attributes for each source in the search engine. Attributes are the fields you want to search for a given source, such as title, content, excerpt, slug, custom fields, categories, tags, and author.
Simply click the ‘Add/Remove Attributes’ button to continue.
From here, you will see a new popup open where you can manage the search attributes.
You can now add custom fields and taxonomies as attributes. For example, let’s say you have an ACF custom field for ingredients for a food blog or number of bedrooms for a real-estate listing, which you’d like to include when searching blog posts.
Similarly, if you have different categories and tags on your site, then you can also make them searchable by selecting them from the ‘Taxonomies’ dropdown menu.
Go ahead and click the ‘Done’ button when you’re finished.
Next, you can change the weights assigned to each attribute for different post types by moving the slider. The plugin will initially set weights for the main attributes like the title, content, slug, excerpt, and author to the best values for most websites. But you can move the slider to adjust the weights according to your requirements.
When you’re done, you can scroll to the top and click the Save button.
After that, you’ll also need to click the ‘Rebuild Index’ button.
SearchWP will automatically start building a new search index for your site.
If you want to learn more, then please see our guide on how to change your WordPress site’s default search settings.
Next, you can test if your synonym rules are working. Simply use the search bar to search for something using one of your synonyms.
If your synonym rules are set up correctly, then you should see the same search results for all the words you set up earlier. For example, we entered ‘investigation’ as the synonym for the search term ‘keyword’ and got the correct result on our demo site.
Bonus: Add Partial Matches (Fuzzy Search) to WordPress
Want to provide an even better search experience to your visitors in WordPress?
With partial matches or fuzzy search, you can help users find the right content on your site even if they make a spelling mistake or typo when entering the search term.
Sadly, WordPress does not support fuzzy search by default. If your visitors type a word or a product name incorrectly, then they won’t get any results and will leave your site unsatisfied.
But with SearchWP, it’s very easy to set up partial matches. You can simply enable the ‘Partial Matches’ option with 1-click in the SearchWP settings.
For more details, please see our guide on how to enable fuzzy search on your WordPress site.
We hope this article helped you learn how to set up synonym rules for WordPress search. You may also want to see our guide on how to customize your WordPress site’s search widget and how to add a modal search form in WordPress.
Ready to create a better and more personalized WordPress search experience? Get started with SearchWP today!