Skip to content

Instantly share code, notes, and snippets.

@Pross
Created March 24, 2014 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/9739870 to your computer and use it in GitHub Desktop.
Save Pross/9739870 to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_head', 'pagelines_google_author_head' );
function pagelines_google_author_head() {
global $post;
if( ! is_page() && ! is_single() && ! is_author() )
return;
$google_profile = get_the_author_meta( 'google_profile', $post->post_author );
if ( '' != $google_profile )
printf( '<link rel="author" href="%s" />%s', $google_profile, "\n" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment