Create a faceted search interface for any post type.
Author: | Marcus Downing (profile at wordpress.org) |
WordPress version required: | 3.7 |
WordPress version tested: | 5.5.0 |
Plugin version: | 2.0 |
Added to WordPress repository: | 05-06-2013 |
Last updated: | 17-11-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 20 |
Rated by: | 1 |
Plugin URI: | http://www.bang-on.net/ |
Total downloads: | 2 307 |
Active installs: | 10+ |
Click to start download
|
A faceted search is one that allows you to drill down by various fields: price, size, colour, shipping location etc. It complements a free text search rather than replaces it.
Using this plugin, you can create a faceted search interface for your pages, posts, or any other custom post type. You can add “facets” for:
- Taxonomies
- Custom fields
- Dates (day, week, month or year)
- Author
These facets are widgets that can be easily changed in the admin interface.
You can have multiple search pages for different post types. If your WordPress installation uses multi-site, you can search across the different sites.
FAQ
What’s wrong with a simple search field?
Nothing, but faceted search makes your search richer.
Faceted search doesn’t replace the normal search field, it complements it. You can have both, without any boundary between them.
What’s a “facet”?
It’s a means of narrowing down search results. A user might want to narrow down by categories or tags, by the author of a post, by the date it was published or by the contents of a taxonomy or custom field.
Why don’t I see any faceted search links?
Make sure to create a search sidebar, and put some widgets into it.
If a facet widget has the Hide empty terms option checked, then that facet may easily disappear from a view when all its links would produce zero results.
Can I put other widgets into the same sidebar as the facet widgets?
Yes. It’s a normal sidebar, you can put any widgets into it.
Can I put facet widets into other sidebars?
If the page you’re on isn’t a search page, facet widgets will be invisible.
Does this work with Relevanssi?
Yes. If you have the Relevanssi plugin switched on at the same time, they’ll cooperate to deliver the best search results.
Does this work with my eCommerce/calendar/reviews/other plugin?
You can make a faceted search on any post type, but it won’t understand any special fields like ‘price’ or ‘score’ if they’re implemented in a non-standard way.
Can I make my own facets? Can I filter the results? Can I change how the plugin works?
Yes, yes and yes.
If you use a plugin that defines its own post types, such as an ecommerce or events calendar plugin, then you might want to make your own facet widgets. Create a WordPress widget and register it in the normal way. Look at the code of the included widgets to get an idea how to implement the links.
There are a lot more actions and filters you can hook into – have a look through the code to find them. Here are just a few of them:
bang_fs_query
– The parameters to WP_Query
bang_fs_results
– The posts returned
bang_fs_count
– The number of results
bang_fs_feedback_args
– The fields to display in the feedback
bang_fs_options
– The plugin settings
Be aware that the internal workings of the plugin are subject to change, so the names and details of these hooks may change in future version.
ChangeLog
2.0
- Settings page makes this plugin suitable for non-developers
- Simplified widgets by moving common options to the settings page
- Auto switch between a list and a dropdown based on number of options
- Updates to work with WordPress 3.8+
- Better integration with Relevanssi and other plugins
- WPMU: Network Search allows you to search between the sites on your network
1.0