Created
October 9, 2018 18:45
-
-
Save djrmom/d1e2d984afe823e84f1e701c2941777e to your computer and use it in GitHub Desktop.
facetwp set range for slider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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