facetwp filter html

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

add_filter( ‘facetwp_facet_html’, function( $output, $params ) {
if ( ‘my_facet’ == $params[‘facet’][‘name’] ) { // change ‘my_facet’ to name of your facet
$output = str_replace ( ‘</select>’ , ‘</select><button onclick=”FWP.refresh()”>>></button>’ , $output );
}
return $output;
}, 10, 2 );
{{/gist}}