Are you trying to add search by category in WordPress sites?
This feature is particularly useful for websites with lots of content, such as blogs or online stores. It lets users search within a specific category, making it easier for them to find blog posts, products, or any information they need.
In this article, we’ll show you how to add search by category in WordPress, helping you make your content more accessible and interactive to your audience.
Key Takeaways:
- Understand how the search by category feature can benefit your online business.
- Learn how to add search by category in WordPress sites using SearchWP.
- Find out more advanced ways to level up your website search experience.
Why Add Search By Category In Your WordPress Site?
If you have a website with lots of content covering many topics, you’ll benefit from adding a search by category form. It’ll help your visitors find what they are looking for easily and quickly.
For instance, if you’re running an online store for pet food. You may have different articles with the same keyword: “Organic diet” for different kinds of pets.
By enabling a category-based search, you are not only helping users find their desired content but also introducing them to new articles that catch their interest. This approach can lead to increased engagement, higher conversion rates, and significant growth for your business.
You can add a search by category form to various types of websites, including blogs, online stores, eLearning platforms, and membership sites.
How To Add Search By Category In WordPress (For Beginners)
WordPress search includes categories and subcategories by default. However, it fails to let your users search through individual categories to narrow their search results.
This is where SearchWP comes in. It’s the best WordPress search plugin used by more than 60,000 businesses worldwide to add advanced search features to their websites.
Using SearchWP, you can add the search by category feature to WordPress without expert technical knowledge. It lets you add a dropdown menu of categories for users to select from when performing a search. All without writing a single line of code.
Here are a few additional features of SearchWP:
- Keyword Stemming: SearchWP automatically includes variations of your search terms, such as “running” and “runner” when you search for “run.” You can adjust the settings to control this feature, ensuring a customized search experience.
- Search Behavior Analysis: With SearchWP, you can keep a pulse on what your visitors are looking for by monitoring and analyzing search trends on your website. This feature provides valuable insights into user preferences and behaviors, helping you refine content strategy and improve user engagement.
- Filter Out Irrelevant Results: Improve the quality of your search results with SearchWP’s ability to exclude non-relevant content or categories. This functionality allows you to streamline the search process, ensuring that users find precisely what they need quickly and efficiently.
Now, let’s see how to add search by category in WordPress step by step.
Step 1: Install & Activate SearchWP
Firstly, you need to pick the SearchWP package that suits your needs, as each package comes with different perks.
After completing the purchase, download the plugin file by navigating to the Downloads tab on your Accounts page.
Remember to copy your license key from the same section; you will need this key to activate your SearchWP plugin later.
Proceed to install and activate SearchWP just like any typical WordPress plugin.
When activated, you will be greeted by a welcome wizard. Click the “Start Onboarding Wizard” button for assistance with the initial setup.
If you choose to skip the wizard and prefer setting up manually, go directly to SearchWP > Add License Key.
Insert the license key you copied earlier into the designated field on your SearchWP Account Dashboard, and click ‘Verify Key’ to proceed with activation.
After your license key is confirmed, your licensing details will be displayed, indicating the successful activation of your plugin.
Step 2: Customize Your WordPress Search Algorithm
SearchWP automatically starts indexing the content on your site upon activation. However, you can take complete control over the search engine. To customize the algorithm manually, visit SearchWP > Algorithm.
The default configuration indexes Posts, Pages, and Media files. You can choose which sources you’d like by clicking on the “Source & Settings” button.
Bonus tip: you can use dedicated Engines for different types of content (or conditions) by leveraging the Supplemental Engines.
Then, select the sources you’d like to make searchable. Click “Done” to apply changes.
You can determine how much each attribute contributes by adjusting the Application Attribute Relevance.
Move the slider next to each attribute to adjust the weight. Sliding it to the right increases its importance in search results while sliding it to the left reduces its impact. This helps you fine-tune how search results are prioritized on your site.
If you wish to ignore any attribute, you can simply do that by clicking on the “Add/Remove Attributes” button.
Uncheck the ones you’d like to remove, and click “Done” to update the settings.
When you are satisfied with the configuration, click “Save” to apply the changes. Our Engine setup is complete.
The index rebuilds periodically to stay up to date with the changes. However, if you see a notice saying, “The index needs to be rebuilt,” you should click the “Rebuild Index” button to force a full manual indexing.
Step 3: Create A Search By Category Form In WordPress
Now that the stage is set. Let’s create a search form to add search by category in WordPress. With SearchWP, you can easily create a search form with only a few clicks.
Navigate to SearchWP > Search Forms and click on the “Add New” button.
Give your search form a memorable name that will help you easily recognize the search form later.
Now, to add search by category in WordPress, select “Category Search” from the Layout Theme.
Make sure the correct Engine is selected. If you have created multiple search engines, it’ll show in the dropdown.
You can choose either the default WordPress Results page or the SearchWP Results page. The benefit of choosing SearchWP is that you’ll be able to make advanced changes to the Search Results page.
Now, add the types of content you want to search for in the “Type of search” field. The sources you selected in the Algorithm (from the previous step) will appear here.
This is the most critical part of this tutorial, you need to select categories that you want to include in the search by category form in the “Select Category.” Only the ones you pick will appear in the dropdown.
Please note: you will only see categories that are currently in use. If a category is not listed, it typically means there is no content associated with it.
Finally, click “Save” to create a search by category form in WordPress.
Step 4: Embed The Search By Category Form In WordPress
There are multiple ways to add the search by category form on your website. Click the “Embed” button next to the “Save” to see all options.
In the popup modal, you’ll see multiple ways to add the search by category form to your website. Follow the one that suits you best.
Let’s see an example of how you can add a search by category form in WordPress using Gutenberg Block.
Open the page where you want to add the search form in Edit mode. Then, find and select the “Search Form” block among other Gutenberg Blocks.
Now, click “Select a Form” to choose your newly created search by category form.
Choose the search form you just created using SearchWP.
Finally, click “Publish/Update”, depending on your scenario, and that’s it!
Open the published page to start using your search by category form in WordPress!
Pro Tips To Make WordPress Search More Powerful
You can add the following features to make searching on your website even better. All of them can be easily achieved using SearchWP, and you don’t require any coding knowledge either.
Show Related Content: You can show content that matches what users are already reading. This helps make their experience better by showing them more articles or posts they might like, which means they might stay on your site longer. This could lead to more views and fewer people leaving quickly.
Add Live Search: Change how users interact with your website through live search. Live Search lets your visitors see results instantly as they type their search query. It helps them find what they need faster and makes searching intuitive.
Set Up Custom Redirects: Help users get to the right place faster with custom redirects. This means if someone searches for something specific, you can send them straight to the best page, like a special deal or a popular article. This is super helpful for advertising or displaying certain posts.
Keep Private Content Safe: You can keep special content safe for only certain people, like subscribers or members. This feature helps restrict who can see and search for private content, keeping them exclusive to your designated audience.
Conclusion
If you add search by category in WordPress sites, it can significantly improve your business. We hope you were able to implement this feature easily on your website. Now, your visitors will be able to search within specific categories without being overwhelmed.
Get SearchWP now to add advanced search features to your website easily!