Do you want to make blog post comments show up in WordPress search results?
By default, WordPress search doesn’t include comments. This can make it difficult for visitors to find interesting conversations and engage with other users.
In this article, we will show you how you can make blog comments searchable on your WordPress website.
Why Make Blog Post Comments Searchable in WordPress?
A lively and interesting comment section can keep people on your WordPress website longer and create a sense of community. With that in mind, you’ll want to do everything you can to get more comments on your WordPress blog posts.
WordPress doesn’t include comments in its search results by default, so visitors may struggle to find interesting discussions and connect with other users.
If you run an online store, then visitors may even use the comments to leave feedback and reviews. By making these comments searchable, you may be able to get more sales.
That being said, let’s see how you can make blog post comments searchable in WordPress.
How to Make Blog Post Comments Searchable in WordPress
The easiest way to make blog post comments searchable in WordPress is by using the SearchWP plugin.
SearchWP is the best custom search plugin for WordPress, used by over 30,000 websites. It’s easy to use and lets you search content that WordPress doesn’t search by default.
For example, you can also easily configure the plugin to include custom post types in WordPress search results, as well as registered users.
To make your blog post comments searchable, you’ll need to install and activate SearchWP. If you need more details, please see our guide on how to install a WordPress plugin.
Upon activation, you will see a popup telling you that SearchWP has already created an engine for you to use.
In this guide, we’ll show you how to change the default engine, so click on the ‘Close’ button to exit the popup.
SearchWP will now take you to the SearchWP » Settings page automatically.
On this screen, click the ‘License’ tab. You can now paste your key into the ‘License’ box.
You’ll find this information in the email you got when you purchased SearchWP and in your account on the SearchWP site.
Once you’ve pasted the license key, click on the ‘Activate’ button next to it.
You are now ready to improve the WordPress search with SearchWP, so go ahead and click on the ‘Engines’ tab.
To search the comments on your WordPress blog, click on the ‘Sources & Settings’ button.
A popup will now show all the different types of content that SearchWP can search. You may see different options depending on the plugins you have installed.
Go ahead and check the ‘Comments’ box, then click ‘Done.’
SearchWP will now include all comments in its search results. You can fine-tune how SearchWP searches your blog comments by scrolling to the bottom of the screen.
In the new ‘Comments’ section, click on the ‘Add/Remove Attributes’ button.
On this screen, you’ll see sections for the different content, such as the author’s name, email address, and comment text. You can now check and uncheck these boxes, depending on the content you want SearchWP to search.
In the following image, we are telling SearchWP to look at the comment’s content by checking the ‘Comment’ box, as well as the name and email address of the person who posted it.
After making your selection, click on the ‘Done’ button. The options you selected will now appear in the ‘Comments’ section.
For each option, SearchWP has an ‘Applicable Attribute Relevance’ scale. This is the weight that SearchWP will give to each attribute when searching the comments on your blog.
Content that matches an attribute with high relevancy will appear higher in the search results. By contrast, content that matches an attribute that has less relevancy will appear lower in the user’s search results.
By default, all the attribute sliders are set to ‘low,’ but you can change that by dragging the slider to the right.
Every site is unique, so you may want to try different relevancy settings to see what gives you the most accurate and helpful search results.
If you want to remove an attribute from your search at any point, then simply repeat the steps above, but this time uncheck the box.
When you are happy with how the search is configured, go ahead and click on the ‘Save Engines’ button.
After a few moments, SearchWP may show the message, ‘The index needs to be rebuilt.’
If you see this message, then click on the ‘Rebuild Index’ button. This will add all your site’s comments to the search index so that they appear in relevant results.
With that done, comments will start appearing in your site’s search results.
How to Change SearchWP Settings
At this point, your comments are searchable. However, you may also want to enable some advanced settings that will help visitors find what they’re looking for.
To take a look at these advanced search settings, click on the ‘Advanced’ tab.
On this screen, you can change a lot of the plugin’s behavior, such as making adjustments for misspellings.
For example, SearchWP can show a ‘Did you mean?’ correction box if someone makes a spelling mistake in their search query. This box contains results that are similar to the search term.
The following image shows an example of how this might look on your website.
To use this feature in your searches, go ahead and check the ‘Automatic “Did you mean?” corrections’ box.
You’ll also need to check the ‘Partial matches (fuzzy when necessary)’ box since the ‘Did You Mean?’ feature uses partial matches.
For more on this topic, please see our guide on how WordPress search works (and tips to make it better).
We hope this article helped you learn how to make blog comments searchable in WordPress. You may also want to see our picks of the best live chat software for small businesses and the ultimate guide to creating a WordPress membership site.