Last active
December 25, 2015 15:48
-
-
Save ChrisCree/7000582 to your computer and use it in GitHub Desktop.
Here is a simple way to customize the output of the Author Box in the Genesis theme framework. Just drop this into your child theme's functions.php file and adjust the $pattern as desired.
This file contains hidden or 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
<?php | |
// Don't copy the opening php tag above | |
add_filter( 'genesis_author_box', 'wsm_author_box_pattern' ); | |
function wsm_author_box_pattern( $pattern ) { | |
$gravatar = get_avatar(get_the_author_id() , 80); | |
$author = get_the_author_meta( 'display_name' ); | |
$description = get_the_author_meta( 'description' ); | |
$pattern = sprintf( '<section %s>', genesis_attr( 'author-box' ) ); | |
$pattern .= $gravatar . '<h3 class="author-box-title">About ' . $author . '</h3><div class="author-box-content" itemprop="description">' . $description . '</div>'; | |
$pattern .= '</section>'; | |
return $pattern; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment