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.
Table of Contents

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.

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

To do this, make sure you have created at least one custom post type, you can use the free Advanced Custom Fields (ACF) to create 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.

searchbar post books

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.

searchbar ajax search 3

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.

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 isn't displaying my custom post types?

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.

Can I use the Search Bar block to search for multiple custom post types?

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.

What is the best way to label the dropdown for the Search Bar block?

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.

Does enabling AJAX Search improve the performance of the Search Bar?

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.

Last reviewed: April 14, 2026

Related Docs