Google displays authorship in search results when you connect your online content with your Google Plus profile.
When authorship is successfully implemented, you’ll see your Google+ information appear integrated with the search snippets for your online publications.
Google Plus authorship includes:
- Your G+ profile picture.
- Your G+ name (including a link to your G+ profile).
- In circles count, the number of people that have you in their Google+ circles.
Adding Google plus authorship to your WordPress blog is pretty straight forward if you own the domain and a corresponding e-mail address. But if this is not the case or you’d like to display the G+ profile of guest authors you need a plugin or this code snippet.
Code explanation
Function 1
The first function adds the Google Plus author field to the WordPress user panel.
The function checks if the array key “googleplus” is set. If this is not the case it will add the extra field.
Function 2
The Second function adds the Google PLus author rel to the posts / pages of your WordPress website.
The output of the code looks like this:
- <link rel=”author” href=”https://plus.google.com/YOUR_ID/posts”/>
To prevent echoing an empty rel=”author” tag, the function checks if the post author G+ profile is available.
Google Plus Authorship function(s)
post_author); if (!empty($googleplus_url)){ $google_plus_author_markup = ''; echo $google_plus_author_markup; } } } add_action('wp_head', 'add_google_plus_author_url'); ?>
Adding Google Plus author profiles to WordPress
Add to WordPress
- Add this code to your functions.php file (inside your theme directory).
- Login to WordPress → Users → Edit User → Google Plus, paste your full Google Plus URL.
Add to Google+
- Login to your Google Plus account → About → Contributor to, paste your article URL.
- And you’re done!
Test the results:
- SEO Review Tools → Bulk Google Plus Author checker
- Google Structured Data Testing Tool → http://www.google.com/webmasters/tools/richsnippets
Do you have trouble displaying your Google Plus author info? Just leave a comment.