---
title: "How to Search by Post Category in WordPress?"
url: https://nexterwp.com/docs/search-by-post-category-in-wordpress/
date: 2024-12-02
modified: 2026-04-14
author: "Aditya Sharma"
description: "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..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Search-by-Post-Category-in-WordPress_-1024x519.jpg
word_count: 289
---

# How to Search by Post Category in WordPress?

## Key Takeaways

- Nexter Blocks Search Bar block lets WordPress users search posts by category by setting Source to Taxonomy and Select Taxonomy to Categories.
- Search Bar block adds a dropdown beside the search bar, with Label, Placeholder, All Result, Show Count, and Show Subcategory options.
- AJAX Search in the Extra Option tab shows posts within a selected category in the search result and supports filtering blog posts within a specific category.

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](https://nexterwp.com/docs/add-a-search-bar-in-wordpress/).

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

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/builder/wordpress-ajax-search-bar/)

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**.

![](https://nexterwp.com/wp-content/uploads/2024/12/searchbar-select-taxonomy.png)

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.

![](https://nexterwp.com/wp-content/uploads/2024/12/searchbar-ajax-search-1.png)

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.

![](https://nexterwp.com/wp-content/uploads/2024/12/searchbar-select-taxonomy-demo.gif)