Do you want to add a WooCommerce product search in your based online store? WooCommerce has it’s own built in search features but it’s not quite good at finding the products and it’s also not capable of searching products by category, price and so on.
You can replace that default search option with a smart search feature which can improve the user experience. A good user experience leads you to a better sell. So here in this article we are going to show the the way to add WooCommerce product search in your WordPress website.
How to add a WooCommerce Product Search
There are a lots of plugin available which offer you to add smart product search option. With the help of these plugin, without any codding knowledge you you can add your unique search features. Here in this article we are using Smart WooCommerce Search to create our search option. With this plugin we will create a customizable search option for our online store.
Step 1 : Creating search option
At first install this plugin and activate it. After successfully install the plugin you can see the Smart search option in your dashboard. Go to Smart search and click on the WooCommerce Product Search option.
Now from the general tab turn on the product search widgets option. And there are many general seeting you can set for your search option. You can set –
- Limit of search character amount
- Result listing amount
- No result text
- View all link text
- Excerpt Symbols Amount
This setting will active for all the products search in you WooCommerce store. After set the general setting click on the save option.
Now click on the Item to search through tab. From this tab you can enable or disable different search criteria such as
- Search in title
- Search in content
- Search in excerpt
- Search in product tag
- Search in product category
- Search in SKU
Next, move on to the Layout tab. From this tab you can enable the field and option to show in search result. For example –
- Displaying image
- Image size
- Display price
- Display SKU
You can style your search option from the Styling tab. You can style the following elements –
- Border color
- Background color
- Title text color
- Excerpt text color
- View all text color
When everything is done click on the save button.
Step 2: Add custom search widgets
After creating our search feature now you need to create custom search widgets for product page. For this go to Smart search > Add new. Now give a name for your widget and then set some general option for the widgets.
In the General tab set some general settings and from the Item to Search Through tab you can find more option like search in products or pages. When everything is done, don’t forget to click on the save button.
Step 3: Display search bar in WordPress
To display our custom search bar in WordPress go to Smart search > Widgets. Here you can see your created search bar and it’s shortcode. Copy this shortcode and go to any pages or post where you want to add the search bar and paste that code.
Now go to your website and you can see the search option in your specific page.