facetwp shortcodes in layout builder

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php
/** use do_shortcode on a builder item **/
add_filter( ‘facetwp_builder_item_value’, function( $value, $item ) {
if ( ‘some_field’ == $item[‘source’] ) { // replace some_field with your item source
$value = do_shortcode( $value ); // limit to 120 characters
}
return $value;
}, 10, 2 );
{{/gist}}