Skip to content

Snippet: Conditionally Show/Hide Blog Post Meta (date, comments, author, etc) Sections

The post meta sections are the

// For the blog posts use 'wpex_blog_single_meta_sections' instead
add_filter( 'totaltheme/blog/meta_blocks/entry_blocks', function( $parts ) {

	// Your meta sections array ( you can move them around or remove some )
	// This is the default array you could also just use unset to remove anything you don't want
	$parts = array( 'date', 'author', 'categories', 'comments' );
	
	// Return sections
	return $parts;

} );
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