When trying to find something in particular, on a large website, we usually go to the search bar. In WordPress, the default search function has limited capabilities. But using the Facetious plugin, we can improve an important aspect of the default search, which is, filtering the search results, based on facets.
The Facetious plugin provides a faceted search option. Facets basically provide for classification. In WordPress facets are taxonomies and post types. The plugin provides a search widget, where you can specify the fields to be used to limit your search.
How to Use the Facetious Plugin?
Install and activate the Facetious Plugin from your WordPress site’s dashboard. Upon activating the plugin, a Facetious Search widget is added under Appearance -> Widgets. Drag and drop this widget to a desired location on the page, like a sidebar or the header. Select the options provided to filter your search results.
There are options provided to select the fields to be searched, which include taxonomies (default and custom) and post types.
Useful Features of the Facetious Plugin
- Restrict search to a Post Type: You can restrict your search results to data under a particular post type. This can be beneficial, especially when you want to limit the search for a particular custom post type.
- The optional Keyword Search box: This option is particularly interesting, because it allows you to remove the keyword based search box. This can be helpful when you have only a limited number of search options or the search is restrictive.
- Pretty Permalinks: The plugin uses a pretty permalink structure for the search queries, which allow for easy caching of such queries by caching plugins.
The Facetious plugin only structures the search query, and eventually relies on WordPress to actually perform the search. Thus if using the default WordPress search, the other limitations are not overcome. Search results formatting, search text highlighting, etc, will depend on the search function your theme will use.
The Facetious Plugin provides advanced search functionality to your WordPress website. But it’s limitation is that it eventually depends on the built-in WordPress search function. It would be beneficial to take a look at the Relevanssi plugin, which replaces the default search functionality, with much better features and configurable options.