Skip to content

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

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.

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 Nexter
CMO at POSIMYTH Innovations · Nexter · 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

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

Why isn't my custom post type showing in the WordPress search results?

The search bar only targets a custom post type after the item is set to Post in the Source section and the correct type is chosen in the Select Post dropdown. Nexter Blocks also has to be installed and activated, because this block is part of Nexter Blocks. If the type still does not appear, the usual miss is skipping the AJAX Search toggle in Extra Option, which is what makes the dropdown-based search behavior work.

What do I need before I can search a specific custom post type in WordPress?

A custom post type has to exist first, and the tutorial uses Advanced Custom Fields (ACF) as one way to create it. The example on the page uses a custom post type called Books, then adds the Search Bar block from Nexter Blocks. That setup matters because the block needs an actual post type to target, not just regular posts or pages.

Can I use a WordPress search bar to filter only one custom post type like Books?

The Search Bar block from Nexter Blocks is built for that exact use case. The page shows a custom post type named Books being selected from the Select Post dropdown after choosing Post as the source. That means users can search within one content type instead of mixing it with everything else on the site, which is cleaner when a site has a lot of structured content.

What does enabling AJAX Search change for custom post type search?

AJAX Search turns the search into a more interactive result flow, so users can select their custom post types from the dropdown and see matching posts without leaving the page. In this tutorial, it is enabled in the Extra Option tab after setting the source and selecting the custom post type. That matters because without it, you do not get the same dropdown-driven search behavior described on the page.

Should I show a label and placeholder for the custom post type dropdown?

Adding both helps users understand what they are filtering before they start typing or selecting anything. The tutorial says you can set a Label field for the dropdown name and a Placeholder field for helper text, so this is mainly about clarity in forms with more than one content type. If you also enable Show Count, users can see how many posts are inside each item, which makes larger content libraries easier to scan.

Where can I see the full Search Bar block details for searching custom post types?

The page points to two useful references: click here for the feature overview documentation and LIVE BLOCK LINK for the live block example. Those links are useful when you want to compare your setup against a working version of Nexter Blocks Search Bar before troubleshooting your own page or template.

Last reviewed: August 18, 2026

Related Docs