Why is my facet missing some choices?
These are the most common reasons for missing facet choices:
No posts in the listing for the missing choices
FacetWP only indexes and displays facet choices that have results in the listing. This means that for a choice to show up, at least one post in the listing needs to have a value set for the data source used.
For example, if your facet uses a taxonomy as data source, make sure there is at least one post in the listing that has the missing term selected for the taxonomy used. If your facet uses a custom field, make sure the field is populated for at least one of the posts.
The facet’s Count setting is too low
If your facet is missing some choices despite posts in the listing using them (as explained above), or if the [+]
icon(s) don’t show up in a hierarchical Checkboxes facet, make sure the facet’s “Count” setting is high enoug
In facets with a hierarchical taxonomy as data source, the count includes child terms/categories. If the count is set too low, (some) child options will not show up.
To fix this, either set a count high enough to include all choices (including child terms/categories), or set it to -1
to show all choices.
Note that not all facet types have a Count setting.
Multiple facet choices sharing a truncated facet_value of 50 characters long
FacetWP’s indexing table has a maximum of 50 characters for the facet_value
(the technical value of the choice) that is stored during indexing. If the value is longer, it is truncated to 50 characters before storing. If the truncated value is the same for multiple choices, this will result in one of the choices missing in the facet.
For example, if you have a facet using a taxonomy, and there are two terms with a slug that is more than 50 characters long, and the difference between those slugs is in the truncated part, both facet choices will be stored with the same facet_value
. Despite these two choices having a different term name (which is stored in facet_display_value
), the shared facet_value
will result in one of the choices missing in the facet.
To fix this, make sure the indexed values (the term slugs in this example) are less than 50 characters. Or if you need them that long, make sure their difference is in the first 50 characters, not in the truncated part.