Quantcast
Channel: Gavin Wray » Data
Viewing all articles
Browse latest Browse all 8

Add Google authorship markup to WordPress sites using All in One SEO Pack

0
0

HTML link snippet

I’ve read up on Google authorship markup this week, particularly in the context of adding it to websites built on WordPress.

For Google, the idea is to surface web content by popular authors in search results. For writers – or indeed anyone publishing online – it can help you assert ownership over your web content and enhance your personal brand online. (Urgh, I sound like a snake oil marcomms consultant; it’s true though.)

Google shows the author’s avatar and extra detail in search results, which help the author’s content stand out. For example:

Authors in Google search results with photos

Authorship markup semantically describes the relationship between a piece of content and its author, so search engines can identify the author’s work published on multiple sites. In practice, this means explicitly linking your Google+ profile to your content using rel="author".

Connect your sites to your Google+ profile

The first thing to do is add the sites you write for to your Google+ profile.

  1. Go to your profile in Google+, select the About tab, scroll down to the Links box and select Edit.
  2. Go the Contributor to section and select Add custom link.
  3. Add your website name and URL:

List of links associated with profile and fields to add new links

Add authorship markup to a single-author WordPress site

After reading lengthy guides by Rick DeJarnette and Tara Horner, adding authorship markup seemed overly complex. For WordPress themes, Tara explains editing the post and author page templates to include rel="author" on the post author name anchor, and linking the author’s name to their Google+ profile.

This doesn’t suit my purposes.

Firstly, I’m the only person writing on this site. In that respect this is a ‘single-author WordPress blog’ and it’s obvious to readers I write all the posts. To change the post metadata to include my name, and link it to my Google+ profile, just so I can add rel="author" seems daft. That would mean changing the post metadata from:

Carefully posted on 15th December 2012

…to:

Carefully posted on 15th December 2012 by <a href="https://plus.google.com/u/1/109382002866848246485/" rel="author">Gavin Wray</a>

(For multi-author WordPress blogs, changing the post metadata in this way would break WordPress’ established navigation to view all posts by an author by clicking the author’s name.)

After digging around my site, I stumbled on a neat solution using the All in One SEO Pack plugin.

  1. Go to your WordPress dashboard menu and select All in One SEO.
  2. Scroll down to the text field labelled Google Plus Default Profile and enter your Google+ profile url. If you don’t know your url, go to Google+, right-click on your Profile icon and copy the link address. It looks like https://plus.google.com/u/1/1234567890.
    Screenshot: copy link address of Google profile
  3. Scroll to the bottom of the All in One SEO settings and select Update Options.

Now visit any page on your site and view the source html. Notice the following line in the head section:

<link href="https://plus.google.com/u/1/yourprofileid123" rel="author" />

This line tells search engines that the page was written by the person who owns the Google+ profile at the specified url.

Verify authorship is working

Now it’s time to test the authorship is working using Google’s structured data testing tool.

  1. Copy any url of a page on your site.
  2. Paste this in the url field of the Google structured data testing tool. You should see a preview of how your page will appear in search results with your avatar, links to more of your content and verified authorship:

Screenshot of verified authorship in Google structured data testing tool

Add authorship markup to a multi-author WordPress site

If your WordPress site has multiple contributors and you use the All in One SEO Pack, the process to add authorship markup is slightly different:

  1. In your WordPress dashboard menu, select All in One SEO.
  2. Scroll down to the text field labelled Google Plus Default Profile and ensure the field is empty.
  3. Go to Users > Your Profile and scroll down to the field labelled Google+ under Contact Info.
  4. Enter your Google+ profile url and save your changes.
  5. Visit any post or page which you published on the site, view the source html and you should see the markup in the head section:
<link href="https://plus.google.com/u/1/109382002866848246485" rel="author" />

Hopefully, that’s simpler than editing your WordPress theme.


Viewing all articles
Browse latest Browse all 8

Latest Images

Trending Articles





Latest Images