Snippets: Insert Blog Meta Under Title for Blog Grid & Carousel

This snippet will insert the default meta output used on the blog into the Blog Grid & Carousel modules right below the title.

// Insert author on blog carousel and grid modules after the title
function my_add_blog_meta_to_builder_modules( $output ) {

	// lets get the default blog meta and assign it to the $author var
	ob_start();
	get_template_part( 'partials/blog/blog-entry-meta' );
	$author = ob_get_clean();

	// Add author to output
	$output = $output . $author;

	// Return title output
	return $output;
}
add_filter( 'vcex_blog_carousel_title', 'my_add_blog_meta_to_builder_modules' );
add_filter( 'vcex_blog_grid_title', 'my_add_blog_meta_to_builder_modules' );

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)