WordPress
Article

Faceted Search with WordPress

By James George

When you’re on a great website full of information, your first instinct may be to sift through the pages to find the information you’re looking for. After trying a few different pages, it can become apparent that you may want to use the website’s search feature. Depending on the search functionality of the site you’re visiting, this could be the best way to find what you’re looking for.

I’ve covered search replacements for WordPress before which you can check out here. It is a viable alternative to the native search feature already built into WordPress. Let’s take a look at faceted search and why you may want to consider using it for your site.

What Is Faceted Search?

Faceted search is essentially advanced filtering for WordPress search results. It isn’t just for a basic WordPress site. You can use it in ecommerce applications, resources libraries and more. Advanced filtering allows your visitors to search your site, but they can select different filtering methods to weed out irrelevant search results. It gives the user a more intuitive way of narrowing their search results. Examples would be the ability to check a box, select options from a dropdown menu, or select date ranges.

In this article, I’m covering the popular FacetWP plugin to help demonstrate the benefits of using a faceted search plugin. If you have come across other useful faceted search plugins please feel free to mention them in the comments below.

The advantages of faceted search are that you customize the entire search experience. How many times have you visited a site that you knew had the information you were looking for, but you had to sift through 20 pages of search results to find it? This can be extremely frustrating.

Other advantages include being able to search custom fields, post types and taxonomies. Many plugins that add search features to your site don’t include custom fields or custom post types in their results.

FacetWP also integrates with any WordPress theme, so it is more information based and less theme-specific.

Here are a few more features:

  • Extremely fast
  • Utilizes AJAX, so all of your searches happen in real time
  • Works with other plugins

You can use it with plugins you might already have, such as WooCommerce, Easy Digital Downloads, WPML and more. This means that the information that is contained within these plugins won’t be excluded in your visitors’ search results.

Search Options

Things You Can Do with Faceted Search

In the demo of the FacetWP plugin, you can test out the capabilities of the plugin, and how you can use it. These features are common for ecommerce sites and directories with different products and listings. The demo lists cars by different criteria, which is really handy for helping visitors to narrow their search results. You may be looking for a specific maker, such as Nissan. You can check that box, and everything that isn’t a Nissan is excluded in the results. From the drop down menu, you can sort the results in different orders. This is how sites like eBay and Amazon allow you to list results by the highest or lowest prices, or by name, horsepower, miles per gallon, etc.

You can see from the example, that you can select multiple boxes. Faceted search allows you to be as broad or specific as you would like. In addition to the features I mentioned above, FacetWP will also enable you to add:

Sliders

The slider option allows you to select results that fit within a specific range. This is great for narrowing your selection by price or for anything that may have a range. This could be a size range in inches or feet, or weight.

Hierarchy

Hierarchy allows your users to refine searches with a hierarchy. This means that you can select an item in a list and that list is included.

Auto Complete

Auto Complete

Auto complete is great for showing options that are spelled the same as what you’re typing. It will include items that have those letters in the word. This is convenient for those who want to type a few letters and find what they are looking for. In the example, they use states like Alabama and Alaska, but it could be anything. Imagine typing in ‘can’ in an online store and options with those letters coming up, such as candles, canned food, canolis, cantaloupes and so on.

Date Range

Date Range

This is great for finding something by a specific date range. This would be ideal for a bank website where you could choose a date range for online statements you would like to view. This could narrow your search, so that you wouldn’t have to sift through years of statements, and you can look through just a couple of months. With faceted search, you can pick the starting and ending dates of your search via a calendar.

Proximity

Proximity

This feature is for finding something via a specific location. It turns Google’s Geocoding coordinates into an address. One of the great things about this feature is that you can choose a radius. If you know you’re close, you could narrow the search to anywhere within a few miles.

Integration

FacetWP also integrates with a couple of the search replacements I mentioned in my previous post. It works nicely with SearchWP and Relevanssi, so even if you’ve already deployed these solutions for your own site, you can still improve search results on your site by adding faceted search.

Conclusion

If you want to build a site that’s easy and intuitive for your visitors to search and find relevant information, faceted search is a no-brainer.

The FacetWP plugin makes it easy to filter results, narrowing the amount of results to the ones that are the most relevant. It is essential for larger sites, which may be packed with thousands of possible search results. If you own or plan to build a large online store, faceted search can make it a snap for shoppers to find exactly what they’re looking for, and find it in the price range they want, too. Not only does this make your site easier to use, but it can help you to make more sales because visitors can go straight to the items they’re looking to purchase.

Free Guide:

7 Habits of Successful CTOs

"What makes a great CTO?" Engineering skills? Business savvy? An innate tendency to channel a mythical creature (ahem, unicorn)? All of the above? Discover the top traits of the most successful CTOs in this free guide.

  • Thomas Serbick

    This sounds like something that will come in very handy. Being new to coding, I was confused about how to put something like this together. I need a search based on time, location, day etc. I will definitely take a look at this plugin. Thanks for the article.

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in WordPress, once a week, for free.