- Help Center Home
- Getting started
- Introducing FacetWP
- Installation and updates
- FAQ
- How it works
- What are facets?
- Facet types
- Built-in facet types
- Checkboxes
- Dropdown
- Radio
- fSelect
- Hierarchy
- Slider
- Search
- Autocomplete
- Date Range
- Number Range
- Star Rating
- Proximity
- Pager + load more
- Sort
- Reset
- User Selections
- Add-on facet types
- Map
- Hierarchy Select
- Range List
- Time Since
- A-Z Listing
- Color
- Custom facet types
- Custom facet types
- Indexing
- Listing templates
- Extras & integrations
- Add-on features and extras
- Using FacetWP with …
- Built-in integrations
- Advanced Custom Fields
- WooCommerce
- SearchWP
- WP-CLI
- Add-on integrations
- Blocks
- Bricks
- Elementor
- Beaver Builder
- WP Recipe Maker and Tasty Recipes
- Relevanssi
- WPML and Polylang
- Meta Box
- Flatsome (theme)
- External integrations
- Breakdance
- Document Library Pro
- Listify (theme)
- Listable (theme)
- WPGraphQL
- Tips & tricks
- WordPress multi-site
- WP All Import
- WebToffee Import Export
- WP Job Manager
- Easy Digital Downloads
- EDD Reviews
- Intuitive Custom Post Order
- Custom Taxonomy Order
- Post Types Order
- Genesis framework
- WP External Links
- ElasticPress
- Yoast SEO
- All in One SEO (Pro)
- The Events Calendar Pro
- Google Analytics 4
- Image Optimization by Optimole
- Meow Lightbox
- Cookiebot
- Caching, hosting & security
- WP Rocket
- Cloudflare
- WP Engine
- New Relic
- WordPress REST API Authentication
- All-In-One Security (AIOS)
- Fast Velocity Minify
- Incompatibilities
- Incompatible plugins and themes
- Troubleshooting
- Troubleshooting guide
- Using the right query
- Common issues
- Common indexing issues
- Get support
- Developers
- Hooks reference
- Indexing hooks
- Querying hooks
- Output hooks
- facetwp_facet_display_value
- facetwp_facet_html
- facetwp_facet_render_args
- facetwp_facet_pager_link
- facetwp_facet_sort_options
- facetwp_template_html
- facetwp_shortcode_html
- facetwp_render_params
- facetwp_render_output
- facetwp_builder_item_value
- facetwp_builder_dynamic_tags
- facetwp_builder_dynamic_tag_value
- Advanced hooks
- Deprecated hooks
- JavaScript reference
- Shortcodes reference
- FacetWP REST API
- How FacetWP works
- The FacetWP URL
- FacetWP speed and limits
- Tutorials
- Code snippets
- Feedback
- What’s new
- Changelog
- News & announcements
Why is my facet empty?
- Have you hit the Re-index button?
- Does a valid listing template exist on your page?
- Do you see a
facetwp-template
class on a container element surrounding your listing? If not, check the documentation on the listing template type you are using for ways to fix this. In most scenarios, you can add this class manually. If you are using an optimization plugin, check if you have an HTML minification setting enabled. HTML minification will remove FacetWP’s<!--fwp-loop-->
HTML comment, which (on some listing template types) is used to automatically detect the listing and add the neededfacetwp-template
class. This happens most often using Cloudflare’s “Auto Minify” feature, and using Fast Velocity Minify. - Is your post type searchable? (is the
exclude_from_search
parameter set tofalse
when the post type is registered)? - Does your facet show any rows after indexing? If not, there could be something wrong with the facet’s selected Data Source. Make sure that you select a valid data source and check if your posts have (valid) values saved for the selected field. After making corrections, re-index again to see the updated row counts. Also, make sure that any custom code using the facetwp_index_row hook is correct, or remove it temporarily to test (make sure to re-index after doing so). To check if facets are working okay in general, create a test facet with its Data Source set to “Post Type” and re-index. This is a Data Source that should always work.
- For some specific types of custom fields — like serialized data or relationship fields — you may need to tell FacetWP’s indexer how to properly index the data.
- Are you using Elementor, with the Element Caching feature enabled? Element Caching is incompatible with FacetWP. If you see a “FacetWP was unable to auto-detect the post listing” error, or if your facets are not showing (or disappearing after use), make sure to disable Element Caching globally or in every FacetWP-related widget.
- Is your site hosted on WP Engine, and are your facets empty after filtering? Try disabling WPE_Governor, which is a WP Engine feature that limits long queries for performance reasons. WPE_Governor can also cause the indexer to stall or not index all your posts. See our WP Engine page for other WP Engine issues and solutions.
- If you are using WPML or Polylang, with the Multilingual add-on, FacetWP expects posts to have a language. Set up translations as instructed, and make sure your page and the posts in the listing all have a language set. To filter posts without a language you can tell FacetWP to ignore the language.
- Are there any JavaScript errors in your browser’s Console that can be fixed or give a clue?
- Turn on Debug Mode and make sure that FacetWP is using the right query.
- Is the WordPress wp_footer() function present in your (child) theme’s footer section? The footer section is usually a file named
footer.php
. If this function is not there, FacetWP’s JavaScript and CSS assets cannot load in the footer, resulting in empty facets. Also code snippets using the “wp_footer” action will not work. Ifwp_footer();
is not present in yourfooter.php
(or your main template, if it does not use a separate footer include), you can add it manually by adding<?php wp_footer(); ?>
to the file, right before</body>
. And of course, make surefooter.php
is actually included in the template used, usually with WP’s get_footer() function. - Do you have post IDs higher than
4294967295
(2^32-1
)? If so, your posts cannot be properly indexed because of the limitations of the database field that stores these post IDs. Implement this fix to increase this limit.
See also
- Indexing
- Listing templates
- Using FacetWP with Cloudflare
- Using FacetWP with Fast Velocity Minify
- Using FacetWP with Advanced Custom Fields
- Using FacetWP with Pods
- The facetwp_index_row hook
- Using FacetWP with Elementor
- Why am I seeing “FacetWP was unable to auto-detect the post listing”?
- Using FacetWP with WP Engine
- Troubleshooting guide
- Using the right query
- The facetwp_assets hook
- How to use custom code?
- Why do my facets disappear?
Last updated: August 15, 2024
Related articles
- Indexing
- Listing templates
- Using FacetWP with Cloudflare
- Using FacetWP with Fast Velocity Minify
- Using FacetWP with Advanced Custom Fields
- Using FacetWP with Pods
- The facetwp_index_row hook
- Using FacetWP with Elementor
- Why am I seeing “FacetWP was unable to auto-detect the post listing”?
- Using FacetWP with WP Engine
- Troubleshooting guide
- Using the right query
- The facetwp_assets hook
- How to use custom code?
- Why do my facets disappear?