Skip to content

Instantly share code, notes, and snippets.

@srikat
Created December 22, 2013 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/8082845 to your computer and use it in GitHub Desktop.
Save srikat/8082845 to your computer and use it in GitHub Desktop.
Changing Author Box Title markup in Genesis. http://sridharkatakam.com/change-author-box-title-markup-genesis/
add_filter( 'genesis_author_box', 'sk_author_box' );
function sk_author_box() {
// Author's Gravatar image
$gravatar_size = apply_filters( 'genesis_author_box_gravatar_size', 70, $context );
$gravatar = get_avatar( get_the_author_meta( 'email' ), $gravatar_size );
// Author's name
$name = get_the_author();
$title = get_the_author_meta( 'title' );
if( !empty( $title ) )
$name .= ', ' . $title;
// Author's Biographical info
$description = wpautop( get_the_author_meta( 'description' ) );
// Build Author box output
$output = '';
$output .= '<section class="author-box" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">';
$output .= $gravatar;
$output .= '<div class="author-box-title">About <span itemprop="name">' . $name .'</span></div>';
$output .= '<div itemprop="description" class="author-box-content">' . $description . '</div>';
$output .= '</section>';
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment