How to remove 'by [author]' from Genesis Framework
I am using Genesis framework for my new site, everything is fine, but I cant find a way to delete the by [author]
under post title. I don't want to hide it with CSS, I want to remove it completely.
The Genesis Framework website adds this to your child theme's functions.php file. I tested this and it works great.
//* Remove the post info function
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
I don't know if you want to edit the core framework files, but this is the easiest way I've come across. (please make a backup before editing this).
The file you have to edit is in the main genesis structure folder /lib/structure/post.php on line 227 you
function genesis_post_info() {
global $post;
if ( is_page( $post->ID ) )
return;
$post_info = '[post_date] ' . __( 'By', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]';
printf( '<div class="post-info">%s</div>', apply_filters( 'genesis_post_info', $post_info ) );
}
edit this for convenience, for what you requested you will have to replace it with
function genesis_post_info() {
global $post;
if ( is_page( $post->ID ) )
return;
$post_info = '[post_date] [post_comments] [post_edit]';
printf( '<div class="post-info">%s</div>', apply_filters( 'genesis_post_info', $post_info ) );
}
If you also want to remove the comment count, please remove [post_comments] as well