If you add tags to your blog posts or products, then they can boost the search experience on your website.
By including tags in the search process, you can allow your visitors to find the content they’re looking for much faster.
As a result, you’ll notice more engagement as people will spend more time on your site.
In this article, we’ll show you how to make posts on your site searchable by tags without writing a single line of code.
Why Make WordPress Consider Post Tags When Performing a Search?
By default, WordPress searches only by post title, description, content, and excerpts.
But there are many other attributes you can add to your posts to make it easier to find them using search. Post tags are one of these attributes.
For example, you can mark specific posts with the Tutorial tag to let your visitors find these posts by the “tutorial” search term. It’ll allow them to find the right content much faster.
And this is not the only benefit of making post tags searchable on your site.
It’ll also help you to:
- Improve the user experience of your visitors: The easier it is to find the right content on your site, the better user experience your visitors will have.
- Increase the average session duration: Users who find the right content stay on your site longer, which is one of the strongest signals for Google to rank your site higher.
- Boost your content discoverability: A positive search experience encourages your visitors to explore more of your content.
Now that you’ve learned why it’s useful to enable search by post tags on your WordPress site, let’s see how you can do that.
How to Make Post Tags Searchable on Your Site
The easiest way to enable search by post tags on your site is to use a plugin like SearchWP.
SearchWP is the best WordPress search plugin that comes with a lot of powerful tools and features.
It allows you to get full control over how search works on your WordPress site and customize it to meet your needs.
For example, using this plugin, you can limit search to specific post types, exclude pages from search results, and more.
Over 50,000 WordPress site owners are already using SearchWP to give their visitors the most relevant search results.
Here are a few more amazing things that you can do with SearchWP:
- Display search results in live mode: Want to immediately deliver search results to your visitors? With SearchWP, you can enable displaying search results in live mode in a few clicks, no coding needed.
- Create custom search forms: Want to create a search form with an individual set of settings? SearchWP allows you to add multiple search engines, fully customize them, and link to specific search forms across your site.
- Prioritize specific pages in search results: You can use SearchWP to put specific pages at the top of search results on your site.
- Enable fuzzy search on your site: Want to give your visitors even more relevant search results? Turn on the SearchWP fuzzy search feature, which makes WordPress search for partial matches.
With that, let’s see how you can easily enable search by posts tags on your site using this plugin.
Step 1: Install and Activate SearchWP
To get started, go ahead and grab your copy of SearchWP by visiting the website and creating a new account.
Then, log into your SearchWP account and go over to the Downloads tab.
Once there, you can press the Download SearchWP button and save the plugin’s ZIP file to your computer.
When you finish downloading, also copy your license key on the same tab. You’ll need it further to activate your copy of SearchWP.
The next step is to upload the SearchWP ZIP file to your site. If you don’t know how to do that, you can see this guide on how to install a WordPress plugin.
After activation, you’ll see the SearchWP’s onboarding wizard. Simply click the ‘Start Onboarding Wizard’ button and follow the instructions to complete the setup.
Once SearchWP is ready, the next step is to configure your search engine to make it consider post tags.
Step 2: Make Changes to Your Search Engine
You can think of a search engine as a set of rules that SearchWP follows when performing a search.
SearchWP allows you to add multiple search engines and link them to individual search forms.
First, there will be only an automatically created search engine called Default.
It’s linked to every existing search form on your site. By customizing its rules and settings, you can change how SearchWP performs a search across your entire site.
For example, you can add or remove search sources, change attribute relevance weights, and more.
To start, head to SearchWP » Algorithm from your WordPress dashboard. The default engine will already have Post selected as a source.
However, you can confirm this by clicking the ‘Sources & Settings’ button.
Next, a popup window will open where you can set the sources for the Default engine.
Just ensure that the ‘Posts’ option is selected as a source. Once finished, you can click the Done button.
To make SearchWP search by post tags, you need to add them to the list of Posts source attributes.
By default, SearchWP considers the following post attributes: title, content, slug, author, and excerpt.
Let’s add post tags to this list. To do that, first press the Add/Remove Attributes button.
A new popup window will now open where you can include custom fields and taxonomies to the search process.
After that, you can click the Taxonomies dropdown menu and click on the Tags (post_tag) taxonomy to add it to the list.
After you’re finished adding taxonomies, go ahead and press Done.
The final step is to save the changes you’ve made to the Default search engine. To do that, press the Save button in the top right corner.
After that, click Rebuild Index to make SearchWP reindex your posts and check if they have any tags.
That’s it. Now your visitors can find posts by their tags.
Let’s try out your new search.
Step 3: Test Your New Search by Tags
To get started, simply visit your site and head to the search form or search bar.
For the purposes of this tutorial, we’ve added a “How to Install a WordPress Plugin” post that has a Tutorial tag.
Let’s see if we can find it only by the tag.
Even though there is no word “tutorial” in the title, description, or content of the post, it still found the correct post.
This means that the search function is working properly and is including tags in the search process.
To make sure it wasn’t a coincidence, let’s do another experiment.
For example, there are several posts with the Showcase tag on our test site. Let’s try to search for them as well.
As you can see, it successfully found the posts by the search term “showcase”.
It means that our WordPress site now considers post tags when performing a search.
FAQs about Searching Posts by Tags
You can also check out some of the common questions users have about searching posts by tags.
1. What are tags, and how do they improve my website’s search experience?
Tags are keywords or phrases that categorize and describe your content. Adding tags to your blog posts or products helps visitors find content more easily, enhancing the user experience by making searches quicker and more relevant.
2. Why should I make post tags searchable on my WordPress site?
Making post tags searchable allows visitors to find content faster, improves the user experience, increases session duration, boosts content discoverability, and helps your site rank higher on Google by signaling better engagement.
3. How can I enable search by tags on my WordPress site without coding?
You can use a plugin like SearchWP, which offers powerful tools to customize your WordPress search functionality, including making post tags searchable.
What’s Next…
Searching by tags will make it easier for your visitors to find the content they’re looking for and improve their user experience.
We hope this article helped you learn how to search posts by tags in WordPress. You may also want to see our guide on how to customize your WordPress search results page and how to add a WordPress search bar with shortcode.
If you’re ready to enable search by post tags on your WordPress site, you can grab your copy of SearchWP here.