Description
This plugin creates two widgets:
- A widget where you can choose from all the categories in your blog.
This is similar to what newegg.com uses, where you can select multiple categories, and it will only show posts belonging to all the categories you select, and such categories can be narrowed down by selecting their subcategories.
- A widget where you can choose from all the tags in your blog
You can select the tags you want to search for, and it will only show posts that have all of the tags you selected.
Known Issues
After upgrading from 2.1 to 2.2 it is highly recommended that you deactivate the plugin and then re-activate it. Unfortunately WordPress 3.1 no longer calls register_activation_hook when the plugins are upgraded, so this may be necessary, otherwise you may not see all your categories.
When using version 3.2 or above, and excluding categories, the display order may or may not be mixed up when you exclude a parent category.
Installation
Standard Install Procedure:
- Upload
faceted-search.zip
to the/wp-content/plugins/
directory and unzip it - Activate the plugin through the ‘Plugins’ menu in WordPress
- Place either ‘Faceted Search Category Widget’ or ‘Faceted Search Tag Widget’ wherever you want on your site
To Upgrade from 1.0:
- Deactivate and delete the 1.0 version.
- Follow the above installation instructions
IMPORTANT: To Upgrade from 2.0 or 2.1:
1. Use the automatic upgrade within the WordPress admin
2. Deactivate the plugin and then re-activate it.
FAQ
- What is a faceted search?
-
A good example of a faceted search is the directory newegg.com uses. Basically, you can select a couple categories (or tags if your using the tag widget), do the search, and the search will yield only articles that belong to all the selected categories (or selected tags). It’s a good way to narrow down searches.
- How do I use these widgets?
-
They both work pretty much the same, except that one goes by the categories on your site, and the other goes by the tags on your site. Just check the checkboxes next to the categories (or tags) that are relevant to your search, and click ‘search’. The real challenge becomes organizing your articles into categories that will allow for intuitive faceted searching, and I can’t help you with that.
- The widget looks ugly, how do I style it?
-
Once the plugin’s installed, just edit the faceted-search.css file that’s in the faceted-search folder to style the lists of categories and tags. If you want different images for the bullets, just replace the ones already in this plugin’s image folder with whatever you want.
- There are some categories missing from display!
-
A common solution to this problem is deactivating and reactivating the plugin.
- How do I exclude or disable a tag or category from the widget?
-
As of version 3.3, there are textboxes in the widget options where you can enter a comma-separated list of tags or categories to exclude from, or disable within, your widget.
- How do I display my search query in the URL so that I can link to it?
-
Select the “Get” request method in your widget. Please note that since this will display the search query in the URL, if you are displaying many categories in your category tree this may become too many characters for your browser’s address bar. Use at your own discretion. From what I’ve read, while http standards say there is no limit, popular browsers might have a URL character limit of around 2000.
- How do I get paged results instead of having the search results all display on one page?
-
To get paged results, you need to switch it to use the “Get” request method.
Reviews
Contributors & Developers
“Faceted Search” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Faceted Search” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
3.4.4
- Quick bugfix: move trim() to correct place when building the query
3.4.3
- Bugfix: Not all descendants were being found in the category hierarchy, leading to missing search results
- Code Cleanup: Got rid of a few loops and replaced them with native php functions
3.4.2
- Bugfix and refactor: Cleaned up category and tag display code, and fix a tag display bug- misplaced closing html “li”
3.4.1
- Quick bug fix: when using paged results navigating from second page back to first was causing first page to display all results
3.4
- Allows you to use the “GET” request method when you submit a form so that your search query displays in the URL so that you can link to it and so that search results are split into pages. Please see the FAQ above.
- Uses search.php to display the search results, if it exists in your theme’s folder.
3.3.2
- Bugfix: Widget was hiding footers for some themes
3.3.1
- Bugfix: Category ordering page was being redirected to index page and erroring out.
3.3
- Added the ability to display but disable (exclude the checkbox for) categories and tags in the widget
3.2.1
- Minor bugfix to clear any residual get variables which might affect the template of the search results.
3.2
- Added the ability to exclude categories and tags from displaying in the widgets.
3.1
- Minor bugfix: categories weren’t showing up if added without specifying slug
- Minor bugfix: posts results were displaying as oldest first instead of newest first
3.0
- Enabled the option to conduct inclusive and ‘smart’ faceted searches in addition to the usual exclusive faceted search
- Re-wrote the search query builders. The new method doesn’t use as many joins so it might not be quite as scalable, but it sure as heck is more readable and easier to work with
2.3
- A bugfix to handle multisite database table prefixes
2.2
- A bugfix to make categories work that have been added or deleted after the plugin has activated.
2.1
- A bugfix to make the tags work again after the 2.0 changes
- An html bugfix for the categories
2.0
- A major code overhaul for building the display tree
- The ability to easily rearrange the categories and how they’re displayed
- Collapseable/expandable category tree
1.0
- Original version