How to Search by Post Category in WordPress?

Key Takeaways

  • Nexter Blocks includes a Search Bar block that allows users to search posts by category in WordPress.
  • The Search Bar block enables the display of post counts and supports searching by subcategories.
  • Users can enable AJAX Search in the Extra Option tab for instant search results within selected categories.
Table of Contents

Do you want to allow users to search blog posts by different categories? This allows users to quickly filter and locate specific content based on its designated category, making navigation and organization much more efficient.

With the Search Bar block from the Nexter Blocks, you can easily allow users to search posts by category in WordPress.

To check the complete feature overview documentation of the Nexter Blocks Search Bar block, click here.

Requirement  – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.

To do this, add the Search Bar block on the page or template and follow the steps –

1. Open the item under Search Bar and select Taxonomy from the Source section.

2. From the Select Taxonomy dropdown, select Categories.

searchbar select

Now, you should be able to see a dropdown beside the search bar.

In the Label field, you can add a label name for the select dropdown.

In the Placeholder field, you can add a placeholder text for the select dropdown.

You can show all the search results on load by enabling the All Result toggle.  

From the Show Count toggle, you can show the number of posts the item has in numbers.

Then from the Show Subcategory toggle, you can search posts by subcategories as well.

Note: You can click on the +Add Item button to use both posts and categories as filters as well.

3. Now go to Extra Option tab and enable the AJAX Search toggle.

searchbar ajax search 1

Now you can select a category from the dropdown to show all the posts within the category in the search result or you can directly search for blog posts within a specific category.

searchbar select taxonomy demo

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What should I do if the Search Bar block is not showing up in WordPress?

If the Search Bar block is not visible, ensure that the Nexter Blocks plugin is installed and activated. This block is a part of Nexter Blocks, and without it, you won't have access to the search functionality. Double-check your plugin settings and confirm that the installation was successful.

What is the best way to label the dropdown for category selection in the Search Bar?

In the Label field of the Search Bar block, choose a clear and descriptive label for the dropdown, such as 'Select Category' or 'Choose a Category'. A well-defined label helps users understand the purpose of the dropdown, making it easier for them to navigate and find the content they need.

How does enabling AJAX Search impact the user experience?

Enabling AJAX Search allows users to see search results dynamically as they type, which enhances the user experience by providing immediate feedback. This feature reduces loading times and makes it easier for users to find relevant posts quickly, as they don't have to submit the search form to see results.

Last reviewed: April 14, 2026

Related Docs