Created
July 21, 2015 19:57
-
-
Save mgibbs189/33920b8e144bd518acfe to your computer and use it in GitHub Desktop.
FacetWP - custom slider step sizes
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 | |
function custom_slider_steps( $output, $params ) { | |
$output['settings']['YOUR_SLIDER_FACET_NAME']['range'] = array( | |
'min' => array( 0.001 ), | |
'25%' => array( 0.01, 0.01 ), | |
'50%' => array( 1, 1 ), | |
'75%' => array( 100, 100 ), | |
'max' => array( 250000 ) | |
); | |
return $output; | |
} | |
add_filter( 'facetwp_render_output', 'custom_slider_steps', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
first of all, thank you for posting this code! :)
I tried to add it to the custom hook plugin, but still it doesn't show any changes in my slider facet.
['YOUR_SLIDER_FACET_NAME'] > I added the label of my slider here.
Do you have any idea? I added screenshots to show what I did.
Thank you,
Lorenzo