Snippets: Alter The Default Title Tag For Total Grid VC Modules


function myprefix_vcex_grid_default_title_tag( $title_tag, $atts ) {

	// You can just return your preferred tag
	$title_tag = 'h3';

	// Or you can check the post type using the atts var
	if ( isset( $atts['post_type'] ) && 'portfolio' == $atts['post_type'] ) {
		$title_tag = 'h4';
	}

	// Return tag
	return $title_tag;

}
add_filter( 'vcex_grid_default_title_tag', 'myprefix_vcex_grid_default_title_tag', 10, 2 );
All PHP snippets should be added via a child theme's functions.php file.