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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' ); | |
} | |
} |
Thanks to: Robin Cornett.
Source: genesis/lib/init.php
[…] https://sridharkatakam.com/remove-post-info-genesis-post-types-post/ […]