Skip to content

Snippet: 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' );
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