skip to Main Content

Alter Meta Sections (date, comments, author, etc) For Custom Post Types

// Alter the meta sections array via the "wpex_meta_sections" filter
// For the blog use the 'wpex_blog_entry_meta_sections' or 'wpex_blog_single_meta_sections' instead
add_filter( 'wpex_meta_blocks', function( $sections ) {

	// 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 any
	$sections = array( 'date', 'author', 'categories', 'comments' );

	// Example of a meta section with a custom output
	$sections['my_custom_block'] = function() {
		echo 'my custom content';
	// Return sections
	return $sections;

} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top