Out of the box, the default WordPress search just provides results based on the content & title of a post. This is usually ok for a simple blog but if you run a more complex type of site such as one using WooCommerce you probably have all sorts of extra data stored in taxonomies – things like size, price, color and so on. This is useful info for people to be able to use when searching on your site and that is where the Profi search form plugin comes in. It allows you to create a detailed search form which can search this meta info, it will also allow you to create range sliders, check boxes, radio boxes and so on which produces a much more useful searching tool.
You are not just limited to using on eCommerce sites though, this could be hand for real estate sites ( the plugin has a map range feature) and any other type of site which uses taxonomies and meta data.
I am currently about working with a WooCommerce site which will use this so I thought I would take look at how it is setup and some of the features.
Install and Setup
To get started, upload and activate the plugin which will create a “Search Filter” menu, then click “Create Search Filter” to begin. You need to enter a name for your search and choose which post type you would like to use, I’m testing this on WPLift so I chose to create a theme search as we use that post type for our theme directory.
The the plugin will list the taxonomies and any post meta associated with the post type you chose, you simply drag to the right anything you would like to use :
You can then choose a layout for the search results page and some color options :
The next stage is to design your actual search form, you do this by dragging a form element to the left, naming it and associating it with a taxonomy or piece of post meta :
Once you save you are given a shortcode to place on a page which will show the form you just created. My above form looks like so :
And after a search performed, the results page :
Obviously the styling of the form and results are dependent on your theme so, like the example above, might require some custom styles to be written to tidy it all up.
Here is a full run-down of the included features:
- Highlight Search Results – When you perform a full text search the matching phrases get highlighted.
- Full text – Define, what contents are searched: The Title, The Content, The Excerpt.
- Range Slider – Realise easily a search, where your client can choose a specific price range. Works for all numeric Post-meta Values, so also for values like city population, year, square meters, number of persons etc.
- Order by – Let the visitor decide, by which values he wants to order his search results. Every Post meta value as well as the post date are possible to use by the “Profi Search Form”-orderby-mechanism.
- Map Search – You have Blog posts, which have attached Latitudes and Longitudes? For example, you run a website with rental houses? Create a map search and your visitor can limit search results easily to an area, by defining an rectangle on a Google map.
- Limit Search results to Categories – Create select-fields, check boxes or radio boxes to limit your search results to specific Categories, Tags, Custom Taxonomies or Postmeta Values.
- Powerful Template Engine – Decide, how the search results will be shown. You can enrich the search results by showing the Terms and Postmeta-Values, which are also accessible through the search in order to give a quick and easy overview.
- Minimum and Maximum – You have for example rental houses with one, two, three… rooms? Give it a search! Find only rental houses with more than 3 bedrooms!
This is a powerful plugin for improving the search capabilities of sites which make use of meta data / taxonomies. From the example above, you can see how search filters can be combined, for example people could search for all themes above $50 which are white. That’s something that just isn’t possible with WordPress without custom coding.
The plugin is easy to use with the drag and drop interface – it’s not the most attractive plugin I’ve ever used but it is functional. If using this, you will have to bare in mind it will probably take a bit of CSS tweaking to get things looking nice with your theme but that shouldn’t be a problem.
Check it out if you need advanced WordPress searching with filters on your site.