Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
facetwp set range for slider
<?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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.