<?php
// With JS:
add_action( 'facetwp_scripts', function() {
?>
<script>
document.addEventListener('facetwp-loaded', function() {
fUtil('.facetwp-type-sort select').addClass('form-select');
});
</script>
<?php
}, 100 );
// Or, with PHP:
add_filter( 'facetwp_facet_html', function( $output, $params ) {
if ( 'sort' == $params['facet']['type'] ) { //
$output = str_replace( 'select', 'select class="form-select"', $output );
}
return $output;
}, 10, 2 );