Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Created June 10, 2020 15:12
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 mgibbs189/81e87e6fd215329778fa67313f316acf to your computer and use it in GitHub Desktop.
Save mgibbs189/81e87e6fd215329778fa67313f316acf to your computer and use it in GitHub Desktop.
FacetWP - change number range "Min" and "Max" labels
<?php
// Add to your (child) theme's functions.php
add_filter( 'gettext', function( $translated_text, $text, $domain ) {
if ( 'fwp-front' == $domain ) {
if ( 'Min' == $translated_text ) {
$translated_text = 'Min (translated)';
}
elseif ( 'Max' == $translated_text ) {
$translated_text = 'Max (translated)';
}
}
return $translated_text;
}, 10, 3 );
@neosaveme-zz
Copy link

Hello,
thank you for this code it works well, I have two facet range number
price and surface
I only need to target their text separately
for example
min price $ and min area m²
can you update this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment