Created
February 10, 2012 21:37
-
-
Save billerickson/1793122 to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter( 'genesis_author_box', 'be_author_box', 10, 6 ); | |
/** | |
* Author Box | |
* | |
*/ | |
function be_author_box( $output, $context, $pattern, $gravatar, $title, $description ) { | |
$output = ''; | |
// Author box on single posts | |
if( 'single' == $context ) { | |
$output .= '<div class="author-box-wrapper"><div class="author-box-top"></div><div class="author-box">'; | |
$output .= get_avatar( get_the_author_meta( 'email' ), 104 ); | |
$title = get_the_author(); | |
if( get_the_author_meta( 'be_team_title' ) ) | |
$title .= ', ' . get_the_author_meta( 'be_team_title' ); | |
$output .= '<div class="info"><h4 class="title">' . $title . '</h4><p class="desc">' . get_the_author_meta( 'description' ) . '</p></div>'; | |
$output .= '<div class="sharing"><p>Share This Post</p><span class="st_twitter_large" displayText="Tweet"></span> | |
<span class="st_facebook_large" displayText="Facebook"></span> | |
<span class="st_plusone_large" displayText="Google +1"></span></div>'; | |
$output .= '<div class="clearfix"></div></div><!-- .author-box --></div>'; | |
// Author box on author archive and team page | |
} else { | |
$output .= '<div class="author-box-wrapper"><div class="author-box-top"></div><div class="author-box large">'; | |
$output .= '<div class="one-half first">' . get_avatar( get_the_author_meta( 'email' ), 250 ) . '</div>'; | |
$title = get_the_author(); | |
if( get_the_author_meta( 'be_team_title' ) ) | |
$title .= ', ' . get_the_author_meta( 'be_team_title' ); | |
$output .= '<div class="one-half"><h4 class="title">' . $title . '</h4>'; | |
$output .= wpautop( get_the_author_meta( 'be_team_long_description' ) ); | |
$output .= '<p class="links">'; | |
if( !is_author() ) | |
$output .= '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '">read my posts</a> | '; | |
$output .= '<a href="mailto:' . get_the_author_meta( 'email' ) . '">email me @ HTC</a>'; | |
$output .= '</p></div><div class="clearfix"></div>'; | |
$output .= '</div><!-- .author-box --></div>'; | |
} | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment