Created
August 4, 2020 14:48
-
-
Save djrmom/7b60335e3850df441fb1ef1d3146a309 to your computer and use it in GitHub Desktop.
facetwp layout builder shortcodes
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 | |
/** use do_shortcode on all layout builder items | |
** it is preferrable to target specific items | |
** as in https://facetwp.com/documentation/developers/output/facetwp_builder_item_value/ | |
** if possible | |
**/ | |
add_filter( 'facetwp_builder_item_value', function( $value, $item ) { | |
$value = do_shortcode( $value ); | |
return $value; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment