X Features Cars Demo Power Plants Demo State Parks Demo Site Showcase Docs Tutorials Add-ons Buy

facetwp_facet_html

Overview

This filter lets you modify a facet’s HTML output.

Parameters

$params = array(
    'facet' => array(
        'name' => 'my_facet',
        'type' => 'checkboxes',
        'source' => 'tax/category',
        // any other facet-specific settings
    ),
    'values' => array(), // available for checkbox & dropdown facets
    'selected_values' => array(100, 101)
);

Usage

add_filter( 'facetwp_facet_html', function( $output, $params ) {
    if ( 'my_facet' == $params['facet']['name'] ) {
        $output = 'Your HTML';
    }
    return $output;
}, 10, 2 );

See Also

Facet Configuration