Created
July 15, 2019 22:54
-
-
Save djrmom/ea568cd8a351d90c97aec1aad7f96530 to your computer and use it in GitHub Desktop.
facetwp custom slider format
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 | |
/** custom number format for a slider facet | |
** change_me needs to be changed to the name of the slider facet | |
**/ | |
add_filter( 'facetwp_render_output', function( $output, $params ) { | |
if ( isset( $output['settings']['change_me'] ) ) { | |
$output['settings']['change_me']['format'] = '0,0.0000'; | |
} | |
return $output; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment