Snippets: Enable Default Visual Composer Templates

Important: Since Total 4.0 and VC 5.1 + there are no longer any default templates available. But we are working on a new system for inserting beautiful "sections" with the VC.

I actually disabled this functionality within the theme because to be honest the built-in layouts they suggest aren’t done very well and was leading to a lot of confusion from my customers. For example one layout was a left and right “blog” layout but it would be ridiculous to display blog posts using single image modules and text modules as it would need constant updating every day as opposed to using a dynamic module.

Also a lot of their layouts simply didn’t look good and had some issues when I was testing them.

That combined with the fact that it adds extra bloat I found it best to disable them.

That said…it’s easy for you to re-enable them. If you are using a child theme simply add this to your functions.php file:

// IMPORTANT YOU CAN NOW DO THIS ALSO VIA A PLUGIN WE RELEASED
// http://wpexplorer-themes.com/total/extensions/

// Re-Enable Visual Composer default templates
function myprefix_reenable_vc_templates() {
	global $wpex_visual_composer_config;
	if ( $wpex_visual_composer_config ) {
		remove_action( 'vc_load_default_templates', array( $wpex_visual_composer_config, 'default_templates' ) );
	} else {
		 remove_action( 'vc_load_default_templates', array( 'WPEX_Visual_Composer_Config', 'default_templates' ) );
	}
}
add_action( 'init', 'myprefix_reenable_vc_templates' );
All PHP snippets should be added via a child theme's functions.php file.