- 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
- Rating
- Proximity
- Map
- Pager + load more
- Sort
- Reset
- User Selections
- Add-on facet types
- Hierarchy Select
- Range List
- Time Since
- A-Z Listing
- Color
- Legacy facet types
- Proximity (legacy)
- Map (legacy add-on)
- 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 and known issues
- WordPress multi-site
- WP All Import
- WebToffee Import Export
- Intuitive Custom Post Order
- Custom Taxonomy Order
- Category Order and Taxonomy Terms Order
- Advanced Taxonomy Terms Order
- Post Types Order
- Easy Digital Downloads
- EDD Reviews
- WP Job Manager
- 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
- Members
- MemberPress
- Caching, hosting & security
- Object caching
- WP Rocket
- Cloudflare
- WP Engine
- Pressable
- 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
- How FacetWP works
- The FacetWP URL
- FacetWP speed and limits
- FacetWP and taxonomies
- FacetWP REST API
- Tutorials
- Code snippets library
- Feedback
- What’s new
- News and announcements
- Changelog
How to hide empty facets?
Facets can become empty when they have no choices left after filtering. But only if their “Show ghost” setting (if it has that) is not enabled.
Facets can also be empty before filtering, if they have no choices indexed/available for the posts in the listing. Or if the listing template’s query has 0 results.
Although empty facets may become invisible because their container element is empty, FacetWP does not actively hide them (except in the Mobile Flyout). So if there is styling attached to the facet container, it will remain visible.
To hide empty facets using a custom code snippet, follow the instructions in this section.
Note that if your facets are added with a Facet block (available in the Blocks add-on v0.3+), you need to use the Facet block’s “Hide when empty” setting instead, which does the same as the custom code.
See also
- What are facets?
- How to hide the listing template until facets are selected
- Using FacetWP with WordPress blocks
- The Mobile Flyout add-on
Last updated: February 9, 2026