---
title: "How to Add Search Bar for Posts in WordPress?"
url: https://nexterwp.com/docs/add-search-bar-for-posts-in-wordpress/
date: 2024-12-02
modified: 2026-04-14
author: "Aditya Sharma"
description: "When you have lots of posts on your website, adding a post specific search can improve the user experience. By adding a search bar for posts will help users to..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-Search-Bar-for-Posts-in-WordPress_-1024x519.jpg
word_count: 255
---

# How to Add Search Bar for Posts in WordPress?

## Key Takeaways

- Nexter Blocks includes a Search Bar block that allows users to add a post-specific search feature in WordPress.
- Users can enable the AJAX Search toggle in the Extra Option tab to enhance search functionality.
- The Search Bar block allows customization with label names and placeholder text for the select dropdown.

When you have lots of posts on your website, adding a post specific search can improve the user experience. By adding a search bar for posts will help users to quickly and efficiently locate the content they are looking for.

With the Search Bar block from the Nexter Blocks, you can easily add a search bar for posts specifically 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 **Post** from the **Source** section.

2. From the **Select Post** dropdown, select **Posts**.

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

Now you can select posts from the dropdown to show all the posts in the search result or you can directly search for blog posts.

In a similar way, you can select pages from the **Select Post** dropdown to search pages only. 

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

## Frequently Asked Questions

**Q: What should I do if the search bar is not displaying correctly?**
A: If the search bar isn't displaying as expected, ensure that the Nexter Blocks plugin is installed and activated. This block is specifically part of the Nexter Blocks, and without it, the search functionality won't work. Additionally, check that you've selected 'Posts' from the Source section in the Search Bar block settings.

**Q: Does the AJAX Search toggle improve search performance?**
A: Enabling the AJAX Search toggle allows users to see search results dynamically as they type, which enhances the search experience. This means users can quickly find relevant posts without needing to reload the page, making it a more efficient way to locate content.

**Q: What are the benefits of adding a search bar for posts on my WordPress site?**
A: Adding a search bar for posts significantly enhances user experience by allowing visitors to quickly locate the content they are interested in. This is particularly important for websites with a large number of posts, as it helps improve navigation and keeps users engaged.
