For some data source types, you may want to add a prefix or suffix to each facet choice. For example, if the data is stored in an ACF Number field, but it’s actually a price or a weight. In those instances, you may want to prepend the choice label with a currency sign, e.g. €, or append it with kg.

With the facetwp_facet_display_value hook, this is very easy to do. You can prepend or append any text you like. You can also use HTML.

If needed, you can do this conditionally, only for a specific facet or facet type. Or based on the choice’s parameters that are available in the hook, like its hierarchical depth, or if it is selected or disabled (a ghost).

If you want to add one or more classes or attributes to the facet choices’ HTML element, you can use the facetwp_facet_choice_classes or facetwp_facet_choice_attributes hooks. Both of these hooks are available in FacetWP v4.6+.

See also

Last updated: October 21, 2026