---
title: "How to Search Specific Custom Post Types in WordPress?"
url: https://nexterwp.com/docs/search-specific-custom-post-types-in-wordpress/
date: 2024-12-02
modified: 2026-04-14
author: "Aditya Sharma"
description: "Custom post types allow users to organize and display their content in a more structured manner. However, as the amount of content on a website grows, finding specific custom post..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Search-Specific-Custom-Post-Types-in-WordPress_-1024x519.jpg
word_count: 297
---

# How to Search Specific Custom Post Types in WordPress?

## Key Takeaways

- Nexter Blocks includes a Search Bar block that allows users to search posts from custom post types in WordPress.
- Users can create a custom post type, such as Books, using the free Advanced Custom Fields (ACF).
- The Search Bar block can display the number of posts available in the selected custom post type using the Show Count toggle.

Custom post types allow users to organize and display their content in a more structured manner. However, as the amount of content on a website grows, finding specific custom post types can become a challenging task. This is where allowing users to search by specific custom post type can be helpful.

With the Search Bar block from the Nexter Blocks, you can easily search posts from custom post types 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, make sure you have created at least one custom post type, you can use the free[ Advanced Custom Fields (ACF)](https://wordpress.org/plugins/advanced-custom-fields/) to[ create a custom post type](https://www.advancedcustomfields.com/resources/registering-a-custom-post-type/).

For instance, we have created a custom post type called Books.

Then add the Search Bar block on the page or template and follow the steps -

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

2. From the **Select Post** dropdown, select your custom post type i.e. Books here.

![](https://nexterwp.com/wp-content/uploads/2024/12/searchbar-post-books.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. 

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

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

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

Now you can select your custom post types from the dropdown to show all the posts in the search result or you can directly search for the custom post type.

## Frequently Asked Questions

**Q: What should I do if the Search Bar block isn't displaying my custom post types?**
A: If the Search Bar block isn't showing your custom post types, ensure that you've created at least one custom post type and that the Nexter Blocks plugin is installed and activated. Without these, the block won't function as intended. Additionally, double-check that you've selected the correct custom post type from the dropdown in the Search Bar settings.

**Q: Can I use the Search Bar block to search for multiple custom post types?**
A: The Search Bar block allows you to select a specific custom post type to search. If you want to search multiple types, you would need to add separate Search Bar blocks for each custom post type. This setup can help users narrow down their search results effectively.

**Q: What is the best way to label the dropdown for the Search Bar block?**
A: When labeling the dropdown for the Search Bar block, choose a clear and descriptive label that indicates the content type users will be searching for, such as 'Select a Book' for a custom post type called Books. A well-defined label enhances user experience by guiding them on what to expect from the search results.

**Q: Does enabling AJAX Search improve the performance of the Search Bar?**
A: Enabling AJAX Search in the Search Bar block allows for real-time search results without reloading the page, which can enhance user experience and performance. This feature is particularly useful for sites with a large number of posts, as it provides immediate feedback and reduces load times.
