<?php
/*
* Filter the html of each facet and add labels in front
*/
function listable_facetwp_facet_html( $html, $params ) {
if ( isset( $params['facet'] ) && isset( $params['facet']['label'] ) ) {
$html = '<label class="facetwp-filter-title">' . facetwp_i18n( $params['facet']['label'] ) . '</label><div class="facet-wrapper">' . $html . '</div>';
}
return $html;
}
add_filter( 'facetwp_facet_html', 'listable_facetwp_facet_html', 10, 2 );