Age of Article Warning:
This article was originally published 28 months ago. The tips and techniques explained may be outdated, or information may longer be applicable. Please consider this when viewing the below content.

**News update August 28th 2014 – AUTHORSHIP HAS ENDED – Google announced that they ceased the Google Authorship program as it was not of benefit to users. Read more about it here

That makes the Authorship instructions below no longer valid for markup. However GOOGLE PUBLISHER MARKUP IS STILL BEING USED BY GOOGLE AND CAN BE TESTED WITH THE GOOGLE RICH SNIPPET TOOL.

Additionally you may find the adding an author box that links to the author’s Google Plus Profile page still a great promotional tool for your authors.

With the recent changes that Google has made to the display of Google Authorship results in it’s SERP, and the current confusion surrounding whether Google+ is still relevant, the time has come to revisit this topic.

Firstly, this article is more relevant for those looking for how to implement Google Authorship and Google Publisher markup on their website, than my previous article published a year or so ago.

Secondly, Google is the biggest search engine, so this is enough reason for me to think that if they provide an option to promote my website using Google+, it’s probably worth giving it a go.

As a bonus, Google provides us with free tools to check how we go with marking up our websites for visibility. So this makes it easier to check how Google sees your website pages markup.

Enough intro, let’s learn more.

Google Authorship is a link joining an article written on a website with the writer’s Google Plus Profile

Therefore the markup for Authorship should appear on a blog article. It lets Google know who wrote the article and that they have a verified Google+ Personal Profile. It appears in searches as shown below:

author information in search results

It’s like me saying, “Hey I wrote this article, and here’s a link to my profile so you can see where else I’ve written articles, and more about me.”

Static pages, such as Contact, About, Products and Services, don’t really need Authorship markup. Even if it’s a one person blog, and you wrote those pages, it’s not necessary to say “Hey Google, I’m the author of this page about products!”

However you might decide to put Authorship on the home page, especially if you are a one person website. Or you might decide to add authorship to certain pages, depending on the purpose of those pages.

Google Publisher Markup links a website with the business/company that publishes it

Therefore the markup for Google Publisher should link the brand to their website. It’s like saying “Hi Google, please be informed that our company publishes this website. Here is our website and here is our Google+ Page, please associate them together.”

So this Publisher markup should most certainly be on the website home page, but probably is fine for all your web pages as your company has published all pages on your website.

publisher information in Google search results

So now how do you set it all up?

Well thankfully Google provides some easy to follow steps. You can view their official documentation here. The following procedure is the current way that I like to set it up, on WordPress websites

Google Authorship Setup

Step 1:
Setup a Google+ Person Profile, if you haven’t already. It’s easy to do, just visit: plus.google.com. Then you need to add a link in the “contributor to” section to the website(s) you author articles on.

Link Contributor to on Google Plus

 

Step 2:
Add a link from your website article, to your author’s Google+ Profile. The link will look like this:

Written by <a href=”https://plus.google.com/profile_id?rel=author”>Author Name</a>

Your profile ID can be seen in the image below (note could be numbers or word, depending on whether you have claimed a personalised Google Plus URL:

Google Plus Profile ID

You could manually enter this at the end (or start) of each article, or you could automate it. I prefer to automate when possible. Now if your theme uses a bio section already at the end of each article post, then simply add the link into your “Biographical Info” in the “Your Profile” settings section of the WordPress dashboard.

If not, then you could setup your own bio section. Or otherwise you could use a function to append the link to the end of an article. I’ll run through this second idea in a moment.

Step 3:
Use a Google Badge on the article page, as a further link to the author’s Google Plus Personal Profile, and to encourage social proof of the author’s relevance to the article. You can add this by following steps on the Google Badge page. Again, if possible automate this to save time.

Step 4:
Check via the Google Rich Snippet Tool for how successful your markup is.

Automate your Authorship Markup on Blog Articles with an Authorship Bio Box

Use the following functions to automate this Authorship Markup for your blog posts- Works for single author and multiple author blogs, and goes into your childtheme’s functions.php file.

// adjust user contact fields
function dt_adjust_user_contact_info( $user_contact ){
    /* Add user contact fields */
    $user_contact['googleplusprofileid'] = __('Google+ Profile ID');
    return $user_contact;
}
add_filter('user_contactmethods', 'dt_adjust_user_contact_info');

//add authorship bio link to articles
function dt_add_authorship_articles_info($content) {
    $googleplus = get_the_author_meta('googleplusprofileid');
    $authorfirstname = get_the_author_meta('first_name');
    $authorlastname = get_the_author_meta('last_name');
    $articletitle = get_the_title();
    if (is_single() && is_main_query() && in_the_loop() && $googleplus!='') {
        $content .='<div class="dt-gplus-snippet"><p>Google Plus Author Info:</p><p>'.$articletitle.' written by <a href="https://plus.google.com/'.$googleplus.'?rel=author" target="_blank">'.$authorfirstname.' '.$authorlastname.'</a></p><div class="g-person" data-href="https://plus.google.com/'.$googleplus.'" data-layout="landscape" data-showcoverphoto="false" data-rel="author"></div></div>';
    }
        return $content;
}
add_filter('the_content','dt_add_authorship_articles_info');

//add googleapi for plusone
function googleapiforplusone() {
    ?><script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js?onload=onLoadCallback';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script><?php }

add_action('wp_footer','googleapiforplusone');

 

How does it work?

The first function – “dt_adjust_user_contact_info” – adds a new field for putting Google+ ID into user profile for your WordPress author’s profile settings page. So make sure your author’s fill in their Google+ Profile ID if they are on Google Plus.

WordPress user profile settings page

The second function – “dt_add_authorship_articles_info” –  appends a new Google+ snippet to the end of blog posts, which includes title of article and the link from step 2 above, with the required ?rel=author. Also included is code to display a Google Profile Badge.

Google Plus Authorship snippet
The third function – “googleapiforplusone” – adds the Google Plus API script required for displaying for the Google Profile Badge.

Then you just need to add some css styling to make it look good. This is what I added to my css stylesheet, but you can customise to suit your website style:

.dt-gplus-snippet {box-sizing: border-box; width:360px; margin: 35px auto; border:10px solid #f1f1f1; border-radius: 12px;padding: 10px 20px;}
.dt-gplus-snippet p:first-of-type {font-weight: bold; text-transform: uppercase;margin-bottom: 10px;}

 

Google Publisher setup

Here are the steps for adding Publisher Markup to your website.

Step 1:
Create a Google Plus page for your business, if you don’t already have one, then fill in your business details and add your website url.

Step 2:
Add the following code inside the header element of your website:

<link href=”INSERT-YOUR-GOOGLE-PLUS-PAGE-URL” rel=”publisher” />

Alternatively, you can simply include a link in your web page text, to your Google+ page like this:

<a href=”https://plus.google.com/plusPageID” rel=”publisher”>My Google+ Page</a>

The function below will add the publisher link to your WordPress header section.

function gplus_publisher_into_header() { ?>
    <link href="INSERT-YOUR-GOOGLE-PLUS-PAGE-URL" rel="publisher" />
<?php }
add_action('wp_head','gplus_publisher_into_header');

Step 3:
Go to your Google Plus page, and navigate to the “About” tab, then click the Link website button next to your website URL. Test. A verified checkmark will display next to your website url. According to Google, it may take a few days for the checkmark to appear.

verified Google Publisher markup

Step 4:
Use a Google Plus Page Badge to encourage interaction between your website and your Google Plus page. If you have already added the Google API Plusone script to your website (from Authorship steps above), then you only need to add the g-page badge. Something like this:

<div class=”g-page” data-href=”https://plus.google.com/plusPageID“></div>

and you can customise this badge over at the Google Badge page.

A good place for the page badge could be in the footer of your website, or in the sidebar. Alternatively you could try out the Follow badge for your Google Plus page, which is what I am using in the footer of my website.

So there you have it, that’s an article for how to add Google Authorship and Google Publisher markup to your website. Below is how the Authorship Bio Box looks on my website. Test it out!

How to setup Google Authorship, Google Publisher and link to your website was last modified: September 6th, 2016 by David Tiong
How to setup Google Authorship, Google Publisher and link to your website