Last active
April 28, 2023 08:34
-
-
Save mattiasghodsian/df6f66415933024d5be4cb76fafea8bc to your computer and use it in GitHub Desktop.
[FacetWP] Set custom min/max value for Single 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
/** | |
* Set custom min/max value for Single Slider in FacetWP (Replace ID-HERE) | |
* | |
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian | |
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5 | |
**/ | |
add_filter( 'facetwp_render_output', function( $output, $params ) { | |
if ( isset( $output['settings']['ID-HERE'] ) ) { | |
$output['settings']['ID-HERE']['range'] = [ | |
'min' => [0], | |
'max' => [1500] | |
]; | |
} | |
return $output; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment