SearchWP

News

How to Make a Search Bar That Searches Your WordPress Site

Do you want to make a search bar that searches your site in WordPress?

A search bar is very important for your website. A powerful search bar helps your site users find all the posts, pages, and products they need quickly. If you put your search bar in the right place, visitors will spend more time on your site. You also get to sell more too.

In this article, we’ll show you how to make a search bar that searches everything on your WordPress site.

You’ll also learn how to add it to specific locations on your site. The best part is that you don’t need to write a single line of code to do these.

Why Make a Search Bar that Searches Your Website?

If you want to offer your site visitors the best user experience, you need to pay attention to your site search. Users need the search feature to find what they’re looking for on your website.

This is even more important if you have a large website with lots of content. Adding a powerful search bar that searches your site will save your visitors a lot of time.

Poor site navigation is one of the major reasons why people leave websites.

Is your site experiencing a high bounce rate? It may be because your site visitors need to search through many pages and posts just to find what they’re looking for. Adding a search bar that searches everything on your site can help you reduce your bounce rate.

But adding just any search bar is not enough. You also want to make sure that your site’s search shows your visitors all the content you have to offer.

By default, WordPress ships with a search feature. But this feature lacks power and doesn’t always give the user the results they need.

Default WordPress search lacks power

The good news is that you can improve your site search using a WordPress plugin. With the right plugin, your users can find all the posts, pages, files, and products they need.

Adding the search bar to the right place helps your users navigate your site better.

You can add the search bar to your sidebar, header, footer, or even within a WordPress page. The options available will depend on the WordPress theme you’re using.

Ready to make a search bar that searches your site? We’ll show you how to do it the easy way.

How to Make a Search Bar That Searches Your Site

To make a search bar that searches everything on your website, you can start by getting a plugin like SearchWP. Even if you’re not tech-savvy, this tool can help you improve your site’s search capabilities with just a few clicks.

SearchWP best WordPress search plugin

As the best WordPress search plugin, your site visitors will enjoy the tons of features it offers. They’ll now be able to find relevant results in seconds each time they use the search bar.

Over 30,000 website owners already use the plugin to improve their site search. It gives you full control over how you want your site to look for search results.

Here are some of the powerful features you get using SearchWP:

  • Search your entire site. SearchWP indexes everything on your website. When your users type in the search bar, your site will look for results in product details, database table content, and even custom fields.
  • Multiple search engines. You can use multiple search engines to create unique search experiences across your website pages. Configure each engine to meet your users’ needs at different points of their journey on your site.
  • Text document indexing. Do you have PDF and office documents on your website? You customers can now find them by searching for keywords they contain.

You probably already feel limited by the default WordPress search features. Or your native search bar doesn’t display relevant results.

SearchWP will help you transform your site search and give your users the best experience possible. You can even use the plugin to add live autocomplete search to WordPress.

SearchWP is so easy to use and you don’t need any technical expertise to use all these powerful features. You can easily use the tool to make a search bar that searches your site in 3 steps.

Step 1: Install and Activate SearchWP

To get started, first get your own copy of the SearchWP plugin here.

Once you’ve grabbed your copy of SearchWP, you’ll get access to download 2 versions of the plugin.

Click any of the links to download the version you want. For the best performance, we recommend the latest version.

SearchWP plugin download links

After grabbing your copy of the tool, SearchWP will also send you an email that contains your product license key. Save this key somewhere you can find it when it’s time to activate the plugin within your WordPress dashboard.

The next thing is to log into your WordPress dashboard and upload the plugin.

You can follow this guide on how to install a WordPress plugin to do that.

Once you’ve installed and activated SearchWP, the next step is to activate the product license.

While activating SearchWP, it added a new SearchWP navigation button to the upper panel of your dashboard. Click this button to go to the settings page.

go to SearchWP settings

On the settings page, navigate to the License tab and fill in the license key from the email you received earlier. Now click Activate.

Activate SearchWP license key

After activating your license, your SearchWP plugin is now all set up and ready for use. Now, it’s time to set up your first search engine.

Step 2: Set Up Your Search Engine

Now that you’ve activated SearchWP, let’s decide how it’ll look for search results. The plugin offers tons of options for customizing your site’s search.

To configure these options, go to the settings page by clicking SearchWP in the top corner of your dashboard.

go to SearchWP settings

Here, you can choose to either edit the default search engine or add a new one. Adding a new site-wide search engine is like making your own Google search algorithm for your website.

SearchWP allows you to add multiple search engines to 1 website. This way, you can offer unique search experiences in different locations of your site.

If you want to create a new engine, simply click Add New.

Add new SearchWP search engine

Next, it’s time to select where you want SearchWP to look when searching for results. To do this, click Sources & Settings.

SearchWP search engine sources and settings

You can choose to search within sources like posts, pages, media files, and products. You can also decide to support keyword stemming (search for similar keywords) or enable admin search. Select as many options as you like in the popup and click Done afterward.

Select SearchWP sources and settings

By default, SearchWP will look at the post title, content, slug, and excerpt for matches. If you want, you can adjust these by clicking on the Add/Remove Attributes button.

Add or remove attributes from SearchWP search engine sources

Here, you can configure which attributes you want to restrict search from this source to. You can choose from attributes like title, slug, content, or short description. You can also include the custom fields and taxonomies like the product variations, post categories, etc.

For example, you can choose to index product attributes like color, model, tags, and shipping class.

SearchWP custom fields and taxonomies

This way, a user can easily find all products in a particular shipping class by searching for the shipping class.

Click Done after choosing all your preferred attributes.

Also, you can add specific rules to further customize the search experience. To do this, click Edit Rules.

Add rules to SearchWP search engine

For example, you can choose to exclude or search for only pages published after a certain date. Once you’re done, click Add Rule then Done.

Add new rule to SearchWP search engine

Next, you can also adjust how your site’s search engine values and ranks content when looking for results. For example, if you want to rank the post title higher than the content, then you can adjust the slider to give more weight to it here.

Adjust SearchWP attribute slider to set relevance

After setting up your sources, adding attributes, and adjusting their relevance, click Save Engines. SearchWP will then apply your new settings and build your search index again.

save changes to SearchWP engine

The last step in this process is to display a search bar on your site.

Step 3: Display the Search Bar on Your Site

You can add a new search bar as a widget and place it anywhere on your website.

The widgets available on your site depends on the WordPress theme you’re using. Some themes automatically add a search bar to your site’s header or sidebar. If your theme doesn’t have one, you can still add it yourself.

For this tutorial, we’ll add the search bar to the sidebar. This location makes it easy to search your site no matter the page the user is on.

To add a new widget, navigate to Appearance » Widgets.

WordPress widgets settings

On the next page, choose where you want to add your widget and click the + icon.

Add WordPress sidebar widget

Then type in search and select the Search icon from the list.

add search bar to WordPress sidebar

Finally, click Update in the top right corner.

Update WordPress widget settings

Congratulations! You’ve just made a search bar that searches your site.

Now, when site users visit your pages and posts, they’ll see a search bar that searches everything on your website.

Search bar that searches your site

In this article, you’ve learned how to make a search bar that searches your site in WordPress.

You can use this feature to improve your site’s user experience and help your customers find the content they need faster.

Are you ready to make a search bar that searches your site? Get started with SearchWP now!

You can also check out our articles on how to add a WooCommerce search form to your shop page or how to restrict WooCommerce product search to title only.

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

  • “SearchWP combines an incredible amount of flexibility with a design that makes it easy to use. Its power lies in the near infinite level of customization. Literally every aspect of your content can be assigned a level of importance.”

  • “My developer recommended this plugin as I quickly found out that WooCommerce was not properly finding products when I would put in a search term! I took him up on his recommendation and haven’t looked back! This is a great plugin! Love it!!”

  • “SearchWP is the booster WP needs. It converts search in what it should be. Great plugin!”

[wpforms id="3080"]