SearchWP

News

How To Create Advanced Search Forms In WordPress

Want to create advanced search forms in WordPress without writing code? Don’t buckle up because it’s going to be an easy ride.

Even if you have what your visitors are looking for on your website, you are losing business if they cannot find it, which is why you need a good search form.

It will help you reduce frustration and increase engagement with your content, providing an improved user experience and decreased bounce rate.

An ideal search form is quite challenging to create with the default WordPress search as it’s time-consuming and requires expert coding skills.

Using a simple plugin, you can create advanced search forms in WordPress easily and within minutes without writing a single line of code!

Therefore, we’ll use SearchWP, the most powerful and easy-to-use search plugin for WordPress.

How To Install And Activate SearchWP: Advanced Search Plugin for  WordPress

SearchWP offers lots of features bundled in different packages. Please have a look at the different plans and find the one that suits you best!

Once done, head over to the Downloads tab on your SearchWP account and get your copy of SearchWP by clicking “Download SearchWP.”

click Download SearchWP

Copy your license key from the same screen; it will be required after a few steps.

Now, you can install and activate SearchWP like any other plugin.

It’s time to verify your purchase. Hover your cursor over SearchWP from the top bar and click Activate License.

Activate license for SearchWP

Paste the license key you copied earlier from your SearchWP Account Dashboard and press Verify Key.

paste the license key and verify 

You’ll see your licensing information appear below if the verification is successful.

successful activation proof 

Gettings The Basics Right: Configure Search Engine for WordPress

First things first: you need a search engine for your search form to work. The built-in WordPress search engine is a basic one and cannot index custom post types, e-commerce products, document content, or taxonomies, to name a few.

To set up the search engine, go to Dashboard > SearchWP > Algorithm. You’ll land on the Engines tab and click “Save” to go with the predefined settings, and your default WordPress search will be replaced with SearchWP Engine.

start the engine to create advanced search forms in WordPress

For customizing the engine according to your needs, visit the documentation.

How to Create Advanced Search Forms In WordPress Easily Without Code

Using SearchWP, you can create a search form in WordPress in 3 easy steps: 1 – add a new form, 2 – configure the form, and 3 – paste the form into your desired location. It’s that simple. Now, let’s see this in action step-by-step.

Step 1: Add New Form

Navigate to SearchWP > Search Forms. Then click on the Add New button.

adding a new form on SearchWP

You’ll get a new form with a system-generated name. Let’s give it a meaningful name, Product Page Search, so it can be recognizable down the road. You can do that by clicking the pencil icon on the top left.

naming the search form 

Step 2: Configure The Form

The effectiveness of a search form depends largely on its design and functionality. Hence, let’s pick a Layout Theme from the predesigned ones. You can see the Theme Preview right beneath the layouts. Pick and choose one that serves you the best.

create advanced search forms in WordPress by choosing a layout

You can also control the layout and features by tweaking the Custom Styling settings. Let’s go over the settings one by one.

Category Search: enabling this will show a category filter dropdown in the search form. It will show all the available categories; however, you can limit the categories by using the Select Category field below.

Quick Search: it promotes custom words right below the search form; with this, you can incentivize visitors to use these search terms if turned on.

Advanced Search: it gives your visitors more control over their search capabilities and lets them narrow their search results.

Any or all of these settings can be turned on independently.

customizing the search form style

Now, we can use different engines for different search forms. If you want to show different results on various forms, you can also benefit from using a supplemental engine. Let’s stick with Default, as we configured that in the previous step.

Let the form know which search results page to use by selecting one from the dropdown menu.

selecting the right engine and choosing a search result page.

As we have already discussed, SearchWP uses its engine to perform search, and what is to be indexed can be defined within the search engine by selecting sources. When a search form uses an engine, it limits the results to only that particular engine.

You can put even more restrictions on the form by using the following two settings:

Type of search: the search engine used by this form uses multiple sources. Selecting them here limits the search to one or more sources. If you leave this field blank, the engine will use all the available sources.

Select Category: you can put even more restrictions and limit the search only to a particular category. For a category to show up here, it must have at least one item assigned to it. Similar to Advanced Searchyour visitors can control search results by selecting their chosen category if Category Search is enabled. Please note the categories you put in here are the ones that will be displayed in the dropdown.

limiting the search results to only the selected sources and categories 

Now, it’s time to customize the search form. Put the text you want to be shown as a placeholder inside the search form by using Field Label, and if you want the search form to have a button, turn on the Search Button.

adding a placeholder and/or a button

Quick Search Items: enable you to nudge the visitors in the direction you want. It lets you put specific keywords under the search form so the users can select what you want them to look for! You can add these keywords by selecting them from the dropdown. The suggestions you see here come from Metrics if you have it enabled; if not, they are based on Statistics.

Advanced Search Filters: you can give visitors more control and help them find exactly what they are looking for by letting them use multiple filters. SearchWP currently has support for Authors, Post Types, and Tags.

leveling up the searching experience. 

Step 3: Style The Form According to Your Taste

SearchWP provides you with 4 different styles for the search form. You can pick one you like from the list and can also customize the color and font size of the form.

customizing the search form style 

You may also like to modify the search button according to your taste. There are 3 button styles, so you have the ability to name the button and customize the background color, font color, and font size. Please note the modification will only work when the Search Button is turned on.

modifying the form button

When you have the form you want perfectly configured, you need to store all the changes we made by clicking the Save button on the top right.

saving the search form after configuration

Step 4: Use the Form According to Your Need

Now that your search form is configured, you can put it anywhere on your site. To do that, click on Embed right next to the Save button.

getting to the embedding options 

There are a few options to embed your search form with just a few clicks. Select how you want to embed the form and follow the instructions.

For instance, if you want to put the search form using a shortcode, select Shortcode from the list, and you’ll be presented with the shortcode associated with the form. Copy and paste it to your desired location.

publishing the search form

You can paste the shortcode by opening the desired page in edit mode.

Voila! The setup is complete, and your search form is ready for action!

Wrapping Up

Using the same technique, you can configure as many custom search forms as you like with only a few clicks. If you want different search forms to show different results, you can do that by leveraging the supplemental engine.

In this tutorial, we have learned how to create a search form in WordPress effortlessly without writing code. SearchWP removes the barrier for coding and enables you to add an advanced search with custom settings. It also comes with countless other features that will improve the search experience for your visitors significantly.

Get the SearchWP plan that fits your needs to take control of WordPress search.

Want to make your search awesome right now?

More than 30,000 sites have chosen SearchWP!

You can utilize all of the content that’s gone unrecognized by native WordPress keyword search instantly with SearchWP.

Get SearchWP for just $99

  • Committed Support
    If you need help, support is fast, friendly, and here for you
  • Streamlined Setup
    Installation and setup that’s optimized for speed
  • Great Documentation
    Helpful, clear, and usable documentation is a priority

See what SearchWP customers have to say

  • “With SearchWP you can tweak your search results so you can better target the needs of your site visitors. You have the power to expand your search into custom fields, target specific areas of your site such as taxonomies, post types, and on and on.”

  • “Dropping this into our rather clunky site made the search work excellently. I like being able to adjust weights of different taxonomies, etc., and integrating with FacetWP. This is one of the better plugins we’ve paid for.”

  • “SearchWP is the best of multiple search plugins I’ve tried. Running a complex content site, being able to rank types of content differently, or even have a separate search engine with its own index for a more specific part of the site, is invaluable.”