Skip to content

Instantly share code, notes, and snippets.

@ChrisCree
Last active December 25, 2015 15:48
Show Gist options
  • Save ChrisCree/7000582 to your computer and use it in GitHub Desktop.
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.
<?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