Snippets: Insert Content Before/After a Total Builder Module

Below are 2 very basic sample functions showing you how you could insert content before or after Total builder modules/shortcodes. Note that the action does pass on both the $shortcode and $atts variables. The $shortcode variable is the name of the module and the $atts variable is an array of defined shortcode parameters.

// Add content before a module
add_action( 'vcex_shortcode_before', function( $shortcode, $atts ) {
	echo 'custom before module content';
}, 10, 2 );

// Add content after a module
add_action( 'vcex_shortcode_after', function( $shortcode, $atts ) {
	echo 'custom after module content';
}, 10, 2 );

Version Required:4.9.9.3+

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file.