The default WordPress search form works well for basic needs, but what if your site needs different search options for various sections — for example, one search for blog posts, another for products, and a third for portfolio items?
Good news: you can easily create and use multiple search forms in WordPress without affecting the default functionality.
In this guide, we’ll show you how to do it — with and without plugins — and customize each search form to fit your specific use case.
Why You Might Need Multiple Search Forms
Having multiple search forms is especially useful when:
You have different content types, such as posts, pages, and products.
You want a search bar for each section, like “Search Blogs,” “Search Products,” or “Search Services.”
You need to limit results to specific categories, tags, or custom post types.
You want to improve user experience and navigation for larger websites.
Method 1: Using Custom Code (Recommended for Developers)
You can create multiple custom search forms by copying and modifying the default searchform.php file in your theme.Step 1: Duplicate and Rename the Search Form
In your theme folder (/wp-content/themes/your-theme/), duplicate the searchform.php file and rename it according to its purpose — for example:
Open each file and modify the search form markup.
Example for a blog search:
And for a WooCommerce product search:
Step 3: Display the Correct Search Form
You can include the appropriate form in your template files using:
Or you can directly use:
This ensures that the right search form appears on the right page or section.
Method 2: Using a Plugin (For Non-Coders)
If you prefer not to code, you can use a plugin such as:
SearchWP
Relevanssi
Ivory Search
Using Ivory Search
Install and activate the Ivory Search plugin.
Go to Ivory Search → Add New Search Form.
Configure what the form searches (posts, products, categories, etc.).
Save and copy the shortcode.
Paste the shortcode anywhere on your site — in widgets, pages, or headers.
Example shortcode:
Each form can have different settings, so you can easily create separate searches for blogs, products, or portfolios.
Tips for Better Search UX
Use clear labels like “Search Articles” or “Find a Product.”
Add placeholder text to guide users.
Display results on a dedicated search results page for clarity.
Implement live search or AJAX search for faster interaction.
Style each form with custom CSS to match your theme.
Final Thoughts
Adding multiple search forms in WordPress helps you deliver a more organized and user-friendly browsing experience. Whether you use custom code or a plugin, you can tailor each search to specific content areas — improving both usability and conversion rates.