Created
December 22, 2013 13:42
-
-
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/
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
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