---
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 Search Bar block searches posts from custom post types in WordPress when the Source section is set to Post and the Select Post dropdown is set to a type like Books.
- Advanced Custom Fields (ACF) creates a custom post type for this setup, and the post uses Books as the example custom post type.
- AJAX Search in the Extra Option tab enables searching custom post types from the dropdown or directly in the search result, with optional Label, Placeholder, and Show Count settings for the select dropdown.

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.