// facetwp_facet_types

Overview

Register new facet types. Please also read How to Create Custom Facet Types.

Parameters

  • $facet_types¬†| array | An array of facet type objects

$facet_types = array(
    'checkboxes' => new FacetWP_Facet_Checkboxes(),
    'date_range' => new FacetWP_Facet_Date_Range(),
    'dropdown' => new FacetWP_Facet_Dropdown(),
    'hierarchy' => new FacetWP_Facet_Hierarchy(),
    ...
);

Usage

add_filter( 'facetwp_facet_types', function( $facet_types ) {
    $facet_types['map'] = new FacetWP_Facet_Map();
    return $facet_types;
});