facetwp set range for slider

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** set a custom range for a slider facet **/
add_filter( ‘facetwp_render_output’, function( $output, $params ) {
if ( isset( $output[‘settings’][‘YOUR_SLIDER_FACET_NAME’] ) ) {
$output[‘settings’][‘YOUR_SLIDER_FACET_NAME’][‘range’] = array(
‘min’ => array( 0 ),
‘max’ => array( 40,000 )
);
}
return $output;
}, 10, 2 );
{{/gist}}