---
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-08-24
lang: en
author: "Aditya Sharma"
description: "When you have lots of posts on your website, adding a post-specific search improves the user experience. A search bar for posts helps users quickly locate the content they are..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-Search-Bar-for-Posts-in-WordPress_-1024x519.jpg
word_count: 237
---

# How to Add Search Bar for Posts in WordPress?

## Key Takeaways

- Nexter Blocks Search Bar block adds a post-specific search bar in WordPress when the block is installed and activated.
- Source section set to Post and Select Post dropdown set to Posts makes the search bar show a dropdown beside it for searching blog posts directly.
- Extra Option tab AJAX Search toggle enables selecting posts from the dropdown to show all posts in the search result, and Show Count displays the number of posts in numbers.

When you have lots of posts on your website, adding a post-specific search improves the user experience. A search bar for posts helps users quickly locate the content they are looking for.

With the Search Bar block in Nexter Blocks, you can add a post-specific search bar 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** xe2x80x93 This block is part of Nexter Blocks. Make sure it is installed and activated.

[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. Go to the **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 search for blog posts directly.

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)