FacetWP is a commercial plugin that lets you easily create filters (checkboxes, radio buttons, dropdowns etc.) for filtering content in WordPress sites.
In this article I explain how FacetWP can be set up in Genesis. Also included is a screencast walkthrough showing an example to filter entries on a CPT archive page by custom taxonomies.
Since version 2.9 of FacetWP "facetwp-template" class is no longer needed for the posts container as FacetWP auto detects blog, shop, archive and search pages.
For a facet to be displayed on a page, that page must contain a list of entries that FacetWP can recognize and the way we do this is by adding facetwp-template class to main element which is typically the parent element for each article in Genesis.
Add this in child theme's functions.php:
To view the full content, please sign up for the membership.
Already a member? Log in below or here.
Hi Sridhar,
I just wanted to say your FacetWP link is presently going to 404.
And thanks for all the great posts lately.
Thanks for bringing this to my attention David. All redirected URLs using Simple URLs plugin stopped working. I have reached out to my host.
Fixed.
Excellent – certainly if I get this I would go via your link.
Hi Sridhar. Namaste. Interesting tutorial…thank you! I’ve built a complex search/filter function in my client’s site using Types and Views. (it’s here: iCouponAds). Do you find any compelling value of using Facet over Views? I’ve used Types & Views for less complex sites and am curious about the ease of use of Facets v Views. Also, can you use Toolset’s CRED and ACCESS with Types while using Facet to filter?
Thanks!
Hi Michael,
Please note that your pagination is not working at all with toolset. See this search page on your site.
http://icouponads.com/search-results/?wpv_post_search=&wpv-category=Bakery&wpv-restaurant-type=0&wpv-health-and-beauty-type=0&wpv-medical-dental-types=0&wpv_filter_submit=Find+It%21&wpv_post_id=321
Cheers.
Great tutorial and love that you also showed us the SearchWP integration too.
Thank you!
Hi Sridhar,
Do you know how I can get FacetWP results to display on a different page than the page that the form is on? I am using SearchWP and Caldera Clarity for FacetWP also. Doesn’t matter much to me which plugin is used to make this work.
The search is a SearchWP supplemental search engine that searches a custom CPT and will have an input for keyword and a dropdown for a region taxonomy.
The search form will be in the top widget area on the home page of a Parallax Pro based child theme.
Thanks!
Ended up using the supplemental SearchWP engine with a custom search form on the home page and putting the faceted search options on the results page. Works great but still curious how do it using FacetWP.