Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MemberPress.com's Google Authorship Customizations
<?php
// This is the code we use on MemberPress.com to customize the Genesis Author Box
// Uses the 'genesis_author_box' to add Google Authorship
add_filter('genesis_author_box', 'my_author_box_output');
function my_author_box_output( $output, $context, $pattern, $gravatar, $title, $description ) {
global $post;
if(isset($post) and $post->post_type=='post')
{
$gplus = get_the_author_meta('googleplus');
if( !empty($gplus) )
$gravatar = '<a href="'.$gplus.'?rel=author">'.$gravatar.'</a>';
return sprintf( $pattern, $gravatar, $title, $description );
}
return '';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.