wordpress search plugin

WordPress is very good at many things but native search isn’t one of them. Given how influential and important search can be to the engagement and a positive UX of a website it’s a shame that the default CMS isn’t better with search. Instead, we have a range of WordPress search plugins (which we have reviewed below) one can use to fill the gaps.

Some of these plugins are free while others are premium. All offer a different range of features and come with their own strengths and weaknesses. With search being such a fundamental part of the web, it makes sense to include a plugin which offers extensive search features on your website.

This review can help. We have scoured the internet for search plugins that work with WordPress. We have sorted the wheat from the chaff, installed them, experimented with them and eventually found twenty of the best WordPress search plugins that we think could deliver the features and qualities you look for.

Whatever type or size of website you run, there is sure to be a search plugin here that delivers what you need!

 

Contents[Show]

Summary

Plugin

Free Version

Starting Price
for Paid

Rating

toolset

Toolset Search

No

$69 p/a

wpsolr logo

WPSolr

Yes

€29 p/m or €199p/a

relevanssi logoRelevanssi

Yes

£98.11 p/a

searchwp logo

SearchWP

No

$99 p/a

ajax search

Ajax Search Lite / Pro

Yes

$36

site search 360

SiteSearch 360

Yes

$9 p/m

yummy wp logo

Smart Ajax Product Search

Yes

$39 p/a

swiftype

Swiftype Search

Yes

$79 p/m

better search

Better Search

Yes

NA

ivory search

Ivory Search

Yes

$19.99

advanced woo

Advanced Woo Search

Yes

£50 lifetime

yith woocommerce search

YITH WooCommerce Ajax Search

Yes

£59 p/a

acf better search

ACF Better Search

Yes

NA

Dave’s WordPress Live Search

Yes

NA

Category Wise Search

Yes

NA

profi search form

Profi Search Form

No

$22

wp google search

WP Google Search

Yes

$29.99

facetwp logo

FacetWP

Yes

$99.99 p/a

jetpack logo

Jetpack Search

No

£25 p/m

reactive pro

Reactive Search Pro

No

$26

How does search help the user experience?

How does search help the user experience

On websites with over a hundred pages or so, search becomes increasingly important. While logical navigation can help a lot, it is search that will deliver the user to the content they are looking for the fastest.

This importance grows exponentially if you’re running an online store. 

Search plays a vital role in the sales funnel as well as overall usability. Look at websites like eBay or Amazon. Search takes on a much more important role and the search box takes on a correspondingly central position on the page.

They know, as we do, that the faster you can get the visitor to what they are looking for, the more likely it is they will buy.

What makes a good search system

What makes a good search system?

There are several key elements that makes up a ‘good’ search system. They include:

Precision - A search engine has to be accurate above all else. We will forgive a small delay or design faux pas if every result we receive is relevant to the search terms we used.

Speed - Speed is also vital to the user experience. We think it comes second to precision but it is still a very important aspect of search. We won’t wait forever and will quickly move on if search takes too long.

Design - A search bar or box needs to be obvious, stand out but not get in the way, make it easy to type in the search term and display the results in an attractive way. Search that integrates seamlessly into a page design is also important but we can overlook a lot in terms of design if the functionality is there.

Semantics - If a plugin can include semantic search, all the better. A search engine needs to know what we mean when we enter a search term so it can provide relevant results. This isn’t vital but definitely adds to the usability if it has it.

Partial terms and phrase search - Again, the more search understands about how we communicate, the better it can serve us. The ability to search using partial terms is of a huge benefit, as is phrase searching. Both combine to improve the user experience and should not be underestimated.

Search filtering - Filtering the search results is more important for larger sites or eCommerce stores than other website types. If you can filter by product, size, price, special features or something else, you receive much more relevant results that shorten that path to purchase.

Clear results - The search results page also needs to be well designed and with clarity at its core. If those results can contain imagery, pricing, direct links to purchase and any supplementary information without becoming crowded all the better.

Best WordPress Search Plugin

These are what we think are the 20 best WordPress search plugin options on the market right now.

They are a mix if the simple and the complex, free and premium, complementary or the separate and the plug and play and the infinitely configurable. Whatever type of website you run, there will be a search plugin here for you!

If you'd like to check out some of the other WordPress plugins we've reviewed, you can visit this part of our website.

Toolset Search

CollectiveRay's Recommended Search Plugin 

Toolset Search is a very configurable WordPress search plugin that delivers everything you need within a single plugin. You can configure how your search looks, display search results on a map, connect it to WooCommerce for online stores, use pagination in results, add filters, work with custom fields and taxonomies, deliver instant results with Ajax, use it with WPML and a whole lot more.

Toolset Search is a very complete WordPress plugin and it has been designed from the ground up to offer a ton of features without having to write a line of code. This is a strong selling point for this plugin.

Aside from ease of use and implementation, search is very powerful and very configurable. You can keep things simple with basic search or configure it to use a map, WooCommerce, filters and even Boolean terms.

Toolset in general supersedes quite a few of the rest of the plugins through the following:

  • You will have complete control over how your search looks. You can even design it all without using any PHP code
  • You can display your results on maps
  • It is fully AJAX enabled, so queries are shown without requiring a full page refresh
  • You can set up multiple filters using custom field and taxonomies to make it easier for users to find what they're looking for
  • The search plugin is fully compatible with WooCommerce and WPML
  • Pagination in results is supported
  • Toolse is compatible with major themes such as Astra, GeneratePress, OceanWP, the Genesis framework etc.

 

At $69, $149 or $299, you'll find cheaper out there, but you won't find better. Considering what you get, it offers excellent value, because this comes as a bundle of plugins which make WordPress easier. 

Check out Toolset WordPress Search Plugin  

 

 

Jetpack Search

Jetpack Search is built into the WordPress powerhouse but is locked behind the top premium tier. At £25 per month, it isn’t expensive if your site is well established but does put it out of reach of smaller sites. In return for your investment, Jetpack Search is just one of the many extra features you get to try.

Jetpack Search uses Elastic search to deliver fast, accurate results. It can cope with an almost unlimited amount of queries and uses the cloud to compute rather than your database. That alone makes it worth checking out.

Elasticsearch is proven to deliver solid search functionality and it’s true here. You also get to use search filters, tags, category search, custom taxonomies, post type filtering and other good stuff. As an added bonus, you also get access to the other premium features of Jetpack as well as search.

 

 

WPSolr

3. WPSolr

WPSolr is a very popular WordPress search plugin due to its ability to cope with larger sites. It uses either the Elasticsearch or Apache Solr search platforms, both of which deliver the goods in terms of search functionality. It can search posts, topics, products, custom fields, attributes and within files such as PDFs. These features and the fact it plays nicely with WooCommerce makes it a firm favourite for eCommerce stores.

Reasons to use WPSolr

The support for custom post types, custom fields and live results means WPSolr delivers an excellent user experience. While this is a premium plugin, you do get a collection of addons to use alongside it for a little extra boost.

Relevanssi

4. Relevanssi

Relevanssi provides local search functions from within your WordPress installation rather than going into the cloud. This may work better for your needs depending on the speed of your host. There is a free version and a premium version that offers full access to the plugin.

This isn’t the cheapest search plugin around, not by a long shot but it is one of the more powerful. At £98.11 per year or £345.88 for a lifetime licence, it isn’t cheap!

Reasons to use Relevanssi

Relevanssi sorts search returns by relevance which the world’s largest search engine does. We are all used to how that works so this works well for users. It works with partial terms, phrases and will highlight search results within documents or pages on the site. It can also search comments, tags and custom fields.

SearchWP5. SearchWP

SearchWP is an incredibly feature-rich search plugin for WordPress. It requires a little more setting up than some of these others but in return you can control every aspect of search within your site. You can limit search to specific areas, limit the number of search at any given time and include or exclude custom fields and other site elements.

One area where SearchWP shines is in its ability to search within PDFs of other documents. If you use them on your site, users can search within them as well as within your site. SearchWP costs $99 for a single site, $149 for up to 5 sites and $299 for unlimited sites.

Reasons to use SearchWP

SearchWP is very easy to use and while you may, or may not, need to go through all the settings to make sure they work for your site, the actual setup and use is very straightforward. Search is fast and delivers reliable results which is going to benefit your site in all the right ways.

Ajax Search Lite

6. Ajax Search Lite / Pro

Ajax Search Lite and Ajax Search Pro are two sides of the same plugin. Lite is the free version that adds basic functionality while Pro is the full plugin. Ajax search uses imagery within its results which instantly makes it a more attractive proposition for users. The plugin also comes with its own themes and layouts so you can decide how you want to present them. 

Ajax Search can search posts, pages, custom fields, BBPress topics, WooCommerce products, custom post types, user meta, BuddyPress groups and a lot more.

Reasons to use Ajax Search Lite / Pro

Ajax Search Lite / Pro’s highlight is its power and the ability to theme the results to match your design. It also presents the results attractively, works quickly, is fully mobile responsive and offers autocomplete and search suggestions. All things we look for in search. Ajax Search Pro costs $36 from CodeCanyon.

Site Search 3607. Site Search 360

Site Search 360 is a very polished plugin that delivers an excellent experience for both web administrator and web user. It comes with its own search designer that makes short work of customising search to your specific requirements. It offers content grouping, autocomplete, semantic search, instant results, API and JavaScript integration, cross-domain search and a whole lot more.

Site Search 360 works well for online stores as search results can be configured to deliver products in an attractive way. Most types of site would work with the plugin as it is very configurable.

Reasons to use Site Search 360

Site Search 360 is very simple to set up and use. It looks great, can integrate with online stores and can be customised to the nth degree. There is a free version and three premium versions at $9, $39 and $99 per month that offer similar features but different search volumes depending on your plan.

Smart Ajax Product Search

Smart Ajax Product Search has something of an identity crisis, being know both as Smart Ajax Product Search and as Smart WooCommerce Search. Either way, it is a very good plugin if you run an online store. It uses Ajax to provide instant results with image integration, filters, smart search IDs and lots of options. Users can search using name, SKU, price, category, tag, variation and more. There is also a useful out of stock exclusion rule too.

The plugin is very configurable with the ability to integrate search into your existing theme. It doesn’t have the power of a page builder but it does everything you need it to do to make it work on your site.

The main USP of Smart Ajax Product Search is the integration with eCommerce stores. Being able to intelligently search for products using various means while optionally restricting out of stock results is very useful. The free plugin is very good at what it does while the premium version allows you to replace default search and use WooCommerce and smart widgets.

Swiftype Search

Swiftype Search is a very popular search plugin for larger or more established websites. It is used on many high profile websites and delivers intuitive search options that mimic search engines for maximum usability. The free version offers core functionality that works well and replaces WordPress’s own search. It works faster than the default, delivers more relevant results and can reach those places WordPress search cannot reach. The premium version costs $79 per month for standard websites and $199 for more advanced search options.

The pro version comes with its own crawler, API, secure cloud search platform, cross-domain search functionality, autocomplete options and a raft of other tools.

Swiftype Search is an incredibly powerful search plugin for larger and very established websites. It offers a Google-like experience for your web users and can integrate seamlessly into your design. Cross-domain search is useful, as is the crawler and API. You really to pay for the privilege though!

Better Search

Better Search is a free plugin that replaces the default WordPress Search. It’s main selling point is ease of use. From the website owner’s perspective, it simply plugs into your website and works where standard search would work. From a user’s perspective, they get a simple search function that can do so much more than the default.

You can leave Better Search just to provide basic search or configure it with filters, relevance sorting, popular search listings, profanity filters, translation for search and even Boolean search. It also works with WordPress caching plugins if you use one of those.

Better Search delivers vastly improved search functionality with very little configuration. You can configure all part of it but the defaults work fine too. If all you want to do is improve search, you can do it in seconds. If you want to supercharge it, you can do that in minutes.

Ivory Search

Ivory Search is both a free and a premium WordPress search plugin. The free version includes unlimited search forms, exclusions, partial terms, WooCommerce product search, bbPress forum search and a year of updates. Upgrade to premium and you can begin ordering search results, filter searches to author, post status, metadata and other operators.

Ivory Search Pro Plus also allows you to search WooCommerce using SKU, allows image search, media search, keyword stemming and adds more exclusion options. Ivory Search Pro costs $19.99 per year while Pro Plus costs $49.99 per year.

Installing and setting up Ivory Search is a breeze. Even the free version covers all the search basics while the premium versions add valuable search functions like exclusions, image search, author search and so on. It is priced lower than some of these competing plugins too and while it isn’t as in-depth as some, it is more competitive than others.

Advanced Woo Search

As its name suggests, Advanced Woo Search is designed to interact closely with WooCommerce. It comes as a free and a premium version and integrates into WordPress seamlessly. You can search your WooCommerce website using product name, within content, categories, by SKU, price and random words. Results can be displayed with images and be ordered by relevance. 

The premium version adds support for changing the search layout, adding filters, adding taxonomy search, custom fields, exclusions, Boolean logic, advanced custom fields and even WooCommerce brands. It has to be one of the strongest eCommerce-oriented search options out there.

The main reason to use Advanced Woo Search is to make your online store much more usable. Users can search by title, content, excerpt, SKU, ID, category, tag and more. It can work with taxonomies, you can theme the results and it all works quickly and very efficiently. The premium version is pretty good value at £50 for a lifetime licence too!

YITH WooCommerce Ajax Search

YITH WooCommerce Ajax Search is a competitor to Advanced Woo Search on every level. It too offers a free and a premium version that offers powerful search functions to use in conjunction with WooCommerce. It uses Ajax search to deliver instant results, product previews, organised results with prices, highlighted special offers or promotions or search by vendor. It is compatible with WMPL too for maximum reach.

The premium version of YITH WooCommerce Ajax Search adds multiple search filters, SKU search, thumbnail results and the ability to design the search results exactly how you want them. The plugin also works with some of the many WooCommerce plugins for full interoperability. At £59.99 for a single site, it isn’t bad value either.

The main reason to use YITH WooCommerce Ajax Search is to expand the search potential of your online store to increase engagement and sales. The plugin is straightforward to set up, offers instant results and can be configured to offer the most engaging results with thumbnails, pricing and anything you want of it.

ACF Better Search

ACF Better Search is a free plugin that adds to the WordPress default search rather than replaces it. It’s a straightforward plugin that adds the ability to search advanced custom fields, hence the name. The developers recently upgraded their search engine to include partial searches as well as full text searches. This adds extra power to this already valuable plugin.

ACF Better Search uses your existing SQL database for search but modifies it so you can search advanced custom fields as well. It’s a very straightforward plugin that you can control with simple configuration options. This makes it ideal for newbie website owners or those who don’t want to deep dive into the complexities of search.

Aside from being free, ACF Better Search plugs into WordPress search rather than replacing it. This is less disruptive and works well for smaller websites for those whom paid plugins are too much and standard search is too little. It is simple to set up and has been very well reviewed.

Daves WordPress Live Search

Dave’s WordPress Live Search is a free WordPress search plugin that offers many of the same features these premium plugins offer. It is a little out of date, having last been tested with WordPress 4.8.1 but it still works fine as far as our testing can ascertain. 

It uses Ajax queries to perform search and works very quickly. As soon as you finish typing in your search term, the results are presented. This is an excellent benefit to users as you can imagine. Dave’s WordPress Live Search doesn’t have the bells and whistles of other plugins but for basic search functionality, it’s hard to beat.

The main reason to use Dave’s WordPress Live Search is because it’s free yet still delivers quality search functionality within your website. It doesn’t have the same level of control or styling options but it works with many content types and includes exclusions for maintaining some control over content.

Category Wise Search

Category Wise Search is a free widget plugin that offers some useful upgrades to the standard WordPress search function. It’s a free plugin that isn’t as feature rich as some of the others in this list but can be implemented very easily and could offer a lot of scope for improving search on smaller websites.

The plugin allows you to configure searches within categories, titles, posts and page content. There is also a useful exclusion rule for those elements you don’t want searched. It’s a very basic search plugin but is worth checking out if either you’re new to WordPress and want to keep things simple or run a small site where standard search is leaving you disappointed.

Category Wise Search keeps things simple. It rights the wrongs of standard WordPress search but doesn’t go into minute detail like some other search plugins. If you’re just after something simple to implement and that works out of the box, this could be it.

Profi Search Form

17. Profi Search Form

Profi Search Form is another viable search plugin for WordPress. Available at CodeCanyon for just $22, it offers full text search, range search, area search with Google Maps, relevance sorting, conditional fields and a whole range of features. 

Profi Search Form also integrates with WooCommerce to add more search functionality to help engage and sell more products. You can use a range slider for prices or ages, an Ajax-based text search that delivers instant results, perform area searches in conjunction with Google Maps, control input fields, search custom fields and even use hidden fields for finite control.

Reasons to use Profi Search Form

Profi Search Form is a very powerful upgrade to WordPress search that is worth the price on its own. Add the ability to integrate into WooCommerce and you have a fully featured search for your store that can genuinely increase sales. The plugin is easy to use and includes highly-rated support too.

WP Google Search

WP Google Search is a plugin that integrates the search engine into your WordPress website. It is free to use but does require you to register for a Search Engine ID so the plugin can use the engine. Other than that, it installs and works seamlessly within your website.

WP Google Search isn’t as configurable as some of the other plugins but it is free and uses the power of Google for search. Unless you need infinite configuration options or to theme it exactly into a design with a page builder, this delivers everything else.

Aside from using the power of Google in your website, the ability to use search as a widget or within a page or post with a shortcode and display results as the familiar Google results. This adds usability while also improving upon WordPress search in all the important ways.

FacetWP

19. FacetWP

FacetWP is something a little different. It’s still search but better. The clue is in the name, facet. Facets work like filters to streamline searches to make them much more relevant. For example, you could search for a new car and use a filter for fuel, transmission, year, manufacturer and so on to drill down to the most relevant results. What’s more, FacetWP can integrate with other search plugins in this list to add facets to their core functionality too.

FacetWP uses Ajax to product dynamic results that can include images and instant results. It works with custom fields and your site’s taxonomies to deliver relevance and can be themes with many leading page builders to fit seamlessly into your site design.

Reasons to use FacetWP

FacetWP is one of the more powerful search plugins here and works quickly. You can tweak your facets to be checkboxes or dropdown options, theme it to your exact requirements, include and exclude terms and use alongside other search engine plugins and page builders. At $99 per year for 1-3 sites or $249 a year for up to 20, it isn’t bad value either.

Reactive Search Pro20. Reactive Search Pro

Reactive Search Pro is available from CodeCanyon and is very powerful. It uses react-redux to perform search and can implement up to 15 operators within search. It can also drag and drop, use map-based search, integrate into a top navi bar, search custom fields and a whole lot more.

Despite being full of features and options, it is actually very straightforward to set up. Once installed, you can begin by using its drag and drop functionality to implement it into your site design and set the limitations and inclusions within the dashboard. It’s about as simple as powerful search gets!

Reasons to use Reactive Search Pro

The two main reasons to use Reactive Search Pro is power and ease of use. You can configure it to an infinite degree if you wish to or leave it set to defaults. Either way, your users get powerful search within your website that works in all manner of ways. As an added bonus, the license is only $26 which comes with everything you need to set it up.

WordPress search tips and tweaks

WordPress search tips and tweaks

These WordPress search plugins handle most of the configuration for you but knowing how to best implement search into your website is about more than using a plugin and forgetting all about it. 

We think it essential that every website owner who uses search understands how it works. That way, you will also learn its potential and its pitfalls. All will combine to improve the overall user experience and engagement.

Here are some tips we have learned in our many years working with search and with WordPress.

1. Using search logs on your website

An often overlooked aspect of search is logging. To understand how people use search on your website, it would be useful to see how often it is used, what terms are most searched for, how long the average search takes to complete and where the visitor goes from there.

Not all search plugins will offer this kind of feature but if you can add search logging to your website before you make a purchasing decision, all the better. When you know how and how often search is used, you can make a much more informed decision about what type of plugin to buy.

You can use WordPress plugins like Search Meter to track search activity. No coding required!

Create an advanced search form for custom post types

2. Create an advanced search form for custom post types

Custom post types are one of the highlights of using WordPress. They provide an almost limitless opportunity to categorise and order your content in any manner you see fit. The more detailed your taxonomy, the more detailed or more advanced your search for can be.

Combining the ability to search for simple terms or add more advanced filters is the mark of a truly outstanding search engine. It can then be all searches to all people and widens the engagement envelope exponentially while delivering something for everyone.

You can implement this yourself my modifying your searchform.php and search.php file.

Add this to searchform.php:

<input type="hidden" name="post_type[]" value="articles" />
<input type="hidden" name="post_type[]" value="post" />
<input type="hidden" name="post_type[]" value="videos" /> 
<input type="hidden" name="post_type[]" value="books" />  

Just modify the value with your own custom post types.

Then add this to search.php:

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" name="s" id="s" <?php if(is_search()) { ?>value="<?php the_search_query(); ?>" <?php } else { ?>value="Enter keywords &hellip;" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;"<?php } ?> /><br />
<?php $query_types = get_query_var('post_type'); ?>
<input type="checkbox" name="post_type[]" value="articles" <?php if (in_array('articles', $query_types)) { echo 'checked="checked"'; } ?> /><label>Articles</label>
<input type="checkbox" name="post_type[]" value="post" <?php if (in_array('post', $query_types)) { echo 'checked="checked"'; } ?> /><label>Blog</label>
<input type="checkbox" name="post_type[]" value="books" <?php if (in_array('books', $query_types)) { echo 'checked="checked"'; } ?> /><label>Books</label>
<input type="checkbox" name="post_type[]" value="videos" <?php if (in_array('videos', $query_types)) { echo 'checked="checked"'; } ?> /><label>Videos</label>
<input type="submit" id="searchsubmit" value="Search" />
</form>

3. Display search term and result count in WordPress

Displaying the search term is a confirmation to the user that they searched for the right term or to show them how they can modify their search to find more relevant results. Showing the number of results can also help users by showing them what to expect from those results.

This is a small thing but can be influential in how people respond to search. If they can see what they searched for and how many results it generated, they can make more informed decisions about what to do next.

You can use a simple code tweak to implement this. Just modify your theme’s search.php file and add or replace the existing code with the following:

<h1 class="page-title">Search Result for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<span class="search-terms">'); echo $key; _e('</span>'); _e(' &mdash; '); echo $count . ' '; _e('articles'); wp_reset_query(); ?></h1>

To make it clear, you code should change from this:

search result count before

 

to this:

search result count after

 

The result will take your site from not showing results, to showing the count:

search results after

4. Highlight WordPress search terms 

Highlighting is a useful way to draw attention toward particular search results. Highlighting the searched term, the most relevant result, the item you want to convert them to or upsell or just draw the searcher’s attention to can help engagement and usability.

The web is fertile ground for directing visitor’s attention where you want it to go. Like products at eye-level in a supermarket, you can tune your website to deliver the results the user is searching for while subtly influencing their next move.

If you wanted to implement this yourself on your own site without a plugin, you just need to add following code to the functions.php of your WordPress theme.

function wps_highlight_results($text){
     if(is_search()){
     $sr = get_query_var('s');
     $keys = explode(" ",$sr);
     $text = preg_replace('/('.implode('|', $keys) .')/iu', '<strong class="search-excerpt"><em>'.$sr.'</em</strong>', $text);
     }
     return $text;
}
add_filter('the_excerpt', 'wps_highlight_results');
add_filter('the_title', 'wps_highlight_results');

You can see the results of this change below:

highlight search terms

Adding a taxonomy filter to WordPress search

Adding filters to search can go a long way to reducing the time spent searching to increase the chances of conversion. If you run a particularly large site or online store, the ability to filter results using custom taxonomies, tags, categories, post types, products and any other relevant filter increases engagement.

As you will know by now, we think anything that shortens that journey time between arrival and the buy button means more conversions!

6. Using multiple search forms in WordPress

Using multiple search forms is a way to tune search within a website to your exact needs. You could use the default search engine on your informational or funnel pages and a WooCommerce-enabled one on your eCommerce pages. You could integrate filter search on product pages and custom field searches on your support pages.

This opens up a whole new field for search and allows you to tune relevance to the subject matter at hand while streamlining each to work fast and deliver precision.

To implement this yourself, you can modify your search.php file and normal-search.php and then add code to your post.

First, open search.php and copy all the code within it. We will need it in a minute. The, replace the code in search.php with:

<?php
if(isset($_GET['search-type'])) {
    $type = $_GET['search-type'];
    if($type == 'random') {
        load_template(TEMPLATEPATH . '/normal-search.php');
    } elseif($type == 'product') {
        load_template(TEMPLATEPATH . '/product-search.php');
    }
}
?>
This code creates two search forms, normal and product search. You can of course call these whatever you want. Then create a normal-search.php file and productl-search.php file. Paste the following code into them:
$args = array( 'post_type' => 'post' );
$args = array_merge( $args, $wp_query->query );
query_posts( $args );

Where you see ‘value="normal"’ change to the value you want.

Now you need to paste the code you saved from the original search.php immediately after the above. Then save.

Modify product-search.php so it reads:

$args = array( 'post_type' => product’);
$args = array_merge( $args, $wp_query->query );
query_posts( $args );

Paste another copy of the original search.php code afterwards.

Where I used product, you could use categories or other parameter relevant to what you want to search for.

Finally, you will need to add code to your form.

<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<input type="text" value="" name="s" id="s" />
<input type="hidden" name="search-type" value="normal" />
<input name="submit" type="submit" value="Go" />
</form>

Again, where you see ‘normal’ change it to whatever you want. Save everything and implement for full effect.

7. Adding a search form in a WordPress post

Adding search forms in posts is another opportunity to sell, promote or keep visitors on your website. If you cover a specific topic on a post, you can offer the search engine to help visitors find corresponding products, supplementary information, pages similar to the one they are on and all manner of search terms.

Post searches can be done using shortcodes, widgets or can be placed within a page builder depending on the plugin you use. Either way, it is another opportunity to build a relationship with that visitor and prove your website worthy of their time.

Adding your own search form in WordPress is very straightforward.

Add this code to your functions.php file:

add_shortcode('cr_search_form', 'get_search_form');

This will display the normal WordPress search form when you use the shortcode ['cr_search_form'] in a post to display it. You can call it whatever you want but you get the idea. 

You can even create a custom search form if you like with this code instead of the above:

function wp_searchform( $form ) {
     $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
    <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
    <input type="text" value="' . get_search_query() . '" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
    </div>
    </form>';
    return $form;
}
add_shortcode('cr_search_form', wp_searchform);

8. Add voice search in WordPress

Voice search is admittedly rarely used but is a neat trick you can add to your arsenal. Voice search is more useful to mobile users than desktop but can also be used for accessibility as well as engagement. 

If you have ever used Siri, Cortana or Google Now, you know how useful voice search can be. Implementing a similar feature on your WordPress website is yet another route to engagement and includes a wider range of users into the fold. Accessibility should not be underestimated either!

You can implement voice search on your own site by using the Voice Search WordPress plugin. The plugin works without any coding or configuration. Once enabled, you should see a small microphone appear on the edge of the search box. Select it to use voice search.

Summing up

Summing up

If you run a new or smaller WordPress website, the default search should be more than adequate. As soon as you begin growing or begin selling products, default search soon leaves you wanting. If you can supercharge search while keeping it invisible to the user then you should begin seeing the fruits of your labour fairly quickly.

If you do sell or promote on your website, adding faster search with filters, the ability to search using custom fields, product name, partials, SKU and any product data is going to make a huge difference to conversion.

Add a clean design for the search results, with images, links to buy and the ability to filter using a number of criteria and you will be competing on a much more level playing field with the bigger operators.

But if you want to take it to the next level, go for an advanced search plugin such as Toolest search.

For a relatively modest investment, you're going to get a great ROI and happy, satisfied customer!

Check out Toolset Now

About the Author
David Attard
Author: David AttardWebsite: https://www.linkedin.com/in/dattard/
David has been working in or around the online / digital industry for the last 18 years. He has vast experience in the software and web design industries using WordPress, Joomla and niches surrounding them. As a digital consultant, his focus is on helping businesses get a competitive advantage using a combination of their website and digital platforms available today.

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!

 

 

Get Started Now With ShutterstockShutterstock

Best Rated Caching Plugin

Make your website faster 

How to make your website FAST!

Step-by-step - free email course, how to make your website load in less than 1 second  

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists.

David attard