Skip to content

Snippet: Alter the Default Grid Entry Title Heading (h2) Tag

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 child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top