As I already wrote in How-to remove the author from your Twenty-Ten posts most blogs do not need the section “by author” since there is only one author.
By default most Genesis themes contain this section (e.g. the prose theme):
Let’s see how-to remove the author’s name from the post info.
The post info is produced by this function:
function genesis_post_info() {
global $post;
if ( is_page( $post->ID ) )
return; // don't do post-info on pages
$post_info = '[post_date] ' . __('By', 'genesis') .
' [post_author_posts_link] [post_comments] [post_edit]';
printf( '%s', apply_filters('genesis_post_info',
$post_info) );
}
As you see the function calls a filter for the string $post_info
which contains the shortcodes for the post info. So it’s easy to define a function which removes the “__('By', 'genesis') . ' [[post_author_posts_link]]
” code:
add_filter('genesis_post_info', 'my_post_info');
function my_post_info() {
$post_info = '[post_date] [post_comments] [post_edit]';
return $post_info;
}
If you put the code in the functions.php
of your Genesis child theme the output looks something like this:
This is all you need if you’re your blog’s only author.
Leave a Reply