facetwp conditional prefix (or suffix) for layout builder

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** $item[‘source’] is the name of the custom field
**/
add_filter( ‘facetwp_builder_item_value’, function( $value, $item ) {
if ( ‘lease_price’ == $item[‘source’] && !empty( $value ) ) { // change ‘lease_price’ to the unique name of your field
$value = ‘Lease Price: $’ . $value;
}
return $value;
}, 10, 2 );
{{/gist}}