Skip to content

Instantly share code, notes, and snippets.

@djrmom
Created July 15, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/ea568cd8a351d90c97aec1aad7f96530 to your computer and use it in GitHub Desktop.
Save djrmom/ea568cd8a351d90c97aec1aad7f96530 to your computer and use it in GitHub Desktop.
facetwp custom slider format
<?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