Created
June 10, 2020 15:12
-
-
Save mgibbs189/81e87e6fd215329778fa67313f316acf to your computer and use it in GitHub Desktop.
FacetWP - change number range "Min" and "Max" labels
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 | |
// 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?