SearchWP

News

How to Restrict WooCommerce Product Search to Title Only

Want to restrict product search in your WooCommerce store to product title only?

Limiting product search to product title only helps your online store show more relevant results. This way, your store visitors will get to find specific products faster.

In this post, we’ll show you how to restrict your WooCommerce product search to title only.

The best part? You can do this even if you’re a WordPress newbie.

Let’s get started!

Why Restrict Product Search to Title Only?

Do you own a WooCommerce store? It’s important to always offer your store visitors the best user experience possible. One of the ways you can do this is to make sure that they find the products they’re looking for fast.

When shoppers search your store, they don’t want to scroll through lots of results to find what they need. Many eCommerce stores lose potential sales because of this. If you want to avoid this, you need to improve how your site searches for products.

Restricting WooCommerce product search to title only improves your store search. It helps your store to target products better and offer more relevant results.

By default, WooCommerce checks titles, slugs, and short descriptions for product search results. But some product descriptions may have keywords that do not match what the user is looking for.

When users type a keyword into the WooCommerce search form, your site will also show products with that keyword in the description. This can make your search less efficient and affect the search experience negatively.

For example, a t-shirt’s description may include words like “Wear with denim jean trousers.” When the shopper searches for ‘denim’ or ‘jeans’, your site will show this t-shirt too.

Default WooCommerce product search results

If you have a large store with similar products, then you don’t want this. It means your users may have to scroll through lots of irrelevant results. By restricting product search to product title only, you get to make your search more precise.

This way, your store visitors can enjoy a better user experience and you’ll get to sell more through your site.

You can restrict WooCommerce product search to product title only in 2 ways. You can either add some code to your site or use a WordPress plugin.

Using a plugin has lots of benefits over adding code to your site manually. When you use a plugin:

  • You don’t need to hire a developer.
  • You don’t need to be a WordPress expert.
  • Even if you’re tech-savvy, a plugin will save you lots of time and effort so you can focus on growing your business more.

Now, let’s talk about how to use a plugin to restrict product search to title only.

How to Restrict WooCommerce Product Search to Title Only

Do you want to limit product search in your WooCommerce store to title only without writing any code? The easiest way to do this is to use a WordPress search plugin like SearchWP.

SearchWP WordPress search plugin

SearchWP is the best WordPress search plugin. You can use the plugin to restrict your product search results to title only. This way, you get to improve your eCommerce site’s search experience.

The tool is easy to use and you only need to change a few settings to refine your site’s search completely. You can fully customize how your site looks for search results.

Other powerful SearchWP features include:

  • Multiple search engines. This plugin lets you set up different search engines on 1 site. You can then display each engine in different site locations. For example, you can display a title-only product search widget on your shop page. Then you can add a different type of search to your blog.
  • Search insights and statistics. SearchWP saves information about what site visitors are looking for on your website. These statistics can help you understand your users better and improve your inventory.
  • Fully-featured search. You can look for search results in product attributes like variations and categories. With SearchWP, you can search everything in your store — even custom fields.

SearchWP integrates automatically with WordPress native search. So once you set it up, you get to enjoy all these features and more.

Now, let’s look at how to use it to restrict product search to product title only.

Step 1: Install and Activate SearchWP

To get started, get a copy of the SearchWP plugin here.

For this process, we’ll grab the Pro or Agency SearchWP license. The WooCommerce product search feature can only work on either of these 2 plans. So, make sure you choose any of them when getting your license.

The Pro license allows you to use SearchWP on 1-5 websites. If you need the plugin for more sites, then go for the Agency license.

After grabbing your copy of SearchWP, you’ll find links to 2 versions of the plugin. We recommend you download the latest version for the best experience.

SearchWP plugin download links

You’ll also get an email with your license key from SearchWP. You can save it to a notepad so you can use it later to activate the plugin on your WordPress site.

Next, log into your WordPress dashboard to upload the plugin.

For more details on this, check this step-by-step guide on how to install a WordPress plugin.

You’ve just installed and activated SearchWP. Now, you’ll see a new SearchWP button at the top panel of your dashboard. Click it to go to the plugin’s settings page.

go to SearchWP settings page

Next, let’s activate the plugin license on the next page. Go to the License tab and type in the license key from the email you received earlier. Now, click Activate.

Activate SearchWP license

Good job! Your SearchWP plugin is now active and ready for use.

Next, it’s time to add the WooCommerce extension.

Step 2: Install and Activate the SearchWP WooCommerce Extension

SearchWP has a standalone WooCommerce add-on plugin. It improves your product search and restricts results to product title only.

Since you already have a SearchWP Pro or Agency license, you can easily download the WooCommerce extension here for free.

Download SearchWP WooCommerce extension

Once you have the extension, upload it to WordPress using the same guide in Step 1.

The SearchWP add-on will automatically integrate with all your WooCommerce search fields. Now, you can restrict product search to title only.

Finally, we’ll show you how to customize your search engine to look for search results in product titles only.

Step 3: Customize Your SearchWP Search Engine

SearchWP allows you to search your site in different ways. Using this plugin, you get full control over how you want your site to look for search results.

The first step to limiting product search to product title is to add products as a source for your search index. To do this, click the SearchWP button in the upper panel of your dashboard.

go to SearchWP settings page

You can either choose to create a new search engine or edit the existing one.

A search engine controls how your site looks for search results. It can decide where the site should look and which attributes to consider. You can also add other specific rules for even more control.

To create a new engine, simply click Add New.

Add new SearchWP search engine

Now click Sources & Settings.

SearchWP search engine sources and settings

Then tick the box beside Products to make sure that SearchWP considers products when looking for search results.

SearchWP add products to sources

You can choose as many sources as you’d like, based on your needs. If you want to limit your results to products only, simply uncheck all the other boxes. Once you’re done choosing your sources, click Done.

Next, scroll to the Products tab and click Add/Remove Attributes.

Customize WooCommerce product search attributes

By default, SearchWP will look at the product title, content, slug, and description for matches. Since we’re limiting product search to product title only, you can just uncheck all other attributes except Title. Then click Done.

Restrict WooCommerce product search to product title only

Next, click Save Engines to apply all your new settings to your site.

Save SearchWP search engine settings

SearchWP will then start building a new search index. Now, when your visitors search for products, your store will restrict all the results to product titles only.

WooCommerce search results after restricting product search to product title only (1)

In this article, you’ve learned how to restrict WooCommerce product search to product title only using SearchWP.

Your users can now target specific products and get more relevant results when using the search feature.

To restrict your product search to product title only, grab your copy of SearchWP here.

You can also use these step-by-step guides to learn how to add search by category to WordPress or add a custom WooCommerce search widget.

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

  • “The SearchWP plugin is a necessity for anyone building out document libraries because it seamlessly searches PDF files. The Search Term Highlighting add-on is also pretty slick.”

  • “I approached the support team with an idea for a customised implementation of the SearchWP weighting system. I was really just looking for a point in the right direction, but Jon went above and beyond all expectations to help me.”

  • “Having run a site with tons of content in it, search is important to my readers. I’ve tried so many plugins for search that, well, that just didn’t cut it. When I hit upon SearchWP my “search” was over. Excellent results and control.”

[wpforms id="3080"]