How to remove post info in Genesis for all post types other than ‘post’

Posted on

Looking to remove the post info (comprised of date, author, link to comments) on entries of all post types except the standard Posts in Genesis?

Just add this in your child theme’s functions.php:

// Remove Post Info from entries of all post types excerpt 'post'
add_action( 'init', 'sk_conditional_post_info', 11 );
function sk_conditional_post_info() {

	$public_post_types = get_post_types( array( 'public' => true, '_builtin' => false ) );

	foreach ( $public_post_types as $post_type ) {
		remove_post_type_support( $post_type, 'genesis-entry-meta-before-content' );
	}
}