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 your 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 around your site.
Because of that, comments are valuable content, and you’ll want to do everything you can to get more comments on your WordPress blog posts.
However, since WordPress doesn’t include comments in its search results by default, visitors may struggle to find interesting discussions and connect with other users or revisit a specific comment thread on your WordPress blog.
You might even be using the comment section for your visitors to submit reviews or testimonials. Having searchable reviews can help to boost sales on your online store, since people will be more likely to find the exact product they’re searching for.
That being said, let’s see how you can fix these problems by making 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 improve the built-in WordPress search.
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. The first step is customizing this engine.
We’ll show you how to change the default engine in this guide, so you can go ahead and click on the ‘Close’ button to exit the popup.
You will now be taken to the SearchWP » Settings page automatically.
On this screen, click on 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.
Next, just click on the ‘Engines’ tab so that you can customize everything that the plugin will display in search results.
You will see here that by default, posts are searchable and are broken into title, content, slug, and excerpt.
To allow comments to be searchable on your site, you want to click on the ‘Sources & Settings’ button near the top-right part of the screen.
A popup will appear in the middle of your screen. Under the ‘Sources’ heading, you’ll see all the different types of content that SearchWP is capable of searching.
By default, the plugin searches your site’s posts, pages, and media.
Go ahead and check the ‘Comments’ box. You can then click on ‘Done.’
This includes all comments in the search results on your site.
You can further customize how your blog comments are searched by scrolling to the bottom of the ‘Engines’ tab. You’ll see a new section where you can configure how your comments will be searched.
To get started, click on the ‘Add/Remove Attributes’ button.
On this screen, you’ll see sections for the different parts of the comments that SearchWP includes in its search results, such as author name, email, and comment text itself.
SearchWP can search the comment’s author name and email address, plus the content of the comment itself.
In the following image, we’re 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.
Whatever options you checked will now appear under the ‘Comments’ section of the ‘Engines’ tab.
For each one, 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 simply 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 decide later that want to remove an attribute from your search, you can simply repeat the steps above, but uncheck the box next to it.
Once you’re happy with how the search feature is set up, you can go ahead and click on the ‘Save Engines’ button.
After a few moments, SearchWP will show a message ‘The index needs to be rebuilt.’
If you do get this message, then go ahead and click on the ‘Rebuild Index’ button. This will add all of your site’s comments to the search index, so they appear in relevant results.
Once you’ve done that, SearchWP will look at your WordPress site’s comments when creating its search results.
How to Change SearchWP Settings
Now that your blog post comments are searchable, you may want to enable some advanced settings that will make it easier for visitors to 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, if someone makes a spelling mistake when typing in their search term, then SearchWP can show a ‘Did you mean?’ correction box with results that are similar to what the search query should have been.
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 tips on SearchWP’s advanced settings, please see our step-by-step guide on how to improve WordPress search with SearchWP.
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.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
The post How to Make Blog Post Comments Searchable in WordPress first appeared on WPBeginner.
Leave a Reply