Claiming your Authorship rights – Google Structured data, getting it right

googleauthor2

It’s all about branding right? Since my initial post outlining some of the things I did to establish my blog, I have spent a bit more time tweaking the structured data I send to Google to ensure there are no errors reported by the Google structured data testing tool This was a bit easier for me because I have registered my own domain name rather than set up my blog on a blogging platform. Here is what I did.

Step 1.

Set up my Google+ profile with a good recognisable headshot

Step 2

Verified my email address at www.rodwebster.com.au according to the instructions here https://plus.google.com/authorship If you don’t have your own domain follow the link to this page that has alternative instructions Option 2

Step 3

Installed the free Fancier Author Box plugin as it looks after claiming my author right with Google using the rel=author tag to reference my Google profile.

Step 4

Commented out the author box that my theme applied so I did not get two author boxes. I edited the loop-single.php file in the top theme folder and commented out this code:
code

You may find your authorbox is in another file and the code could well look different to what I found. With a bit of luck, you might be able to disable the authorbox in your theme without coding.

Step 5

Completed the additional social media fields added to my user profile (I also set up the administrator account with my details as well) and in particular the link to my Google+ profile.

Step 6

Retested a URL on my web site for a single post at the Google structured data testing URL above.

This claimed my author rights with Google and my photo started to appear in searches about 3 days after I did this, there were still a number of errors being reported the Google rich snippets tester. I tried a number of ways to remove them but eventually settled on the neat method devised by David Tiong in this post Fix hAtom microformats – at least one field must be set for HatomEntry. I added his code to functions.php as he suggests. I found this file in the top folder of my theme.

This hooks into WordPress and prints a small sentence at the bottom of the post. Testing the page at Google again, should show no errors anymore! I decided to edit the code slightly to shorten the sentence that it prints by using this

code2

Instead of the longer version David used.

step 7

The other part that David did not make 100% clear is how to add a new style to your style.css file if you are new to WordPress. You will find this file in the {your_theme}/css folder.
I added this code to the bottom of the styles.css which comments out the alternative style that hides this extra sentence. I left the alternative form in the file commented out in case I change my mind. My take on this (and as a newbie to myself, I could be wrong) is that it is not a good idea to hide things from Google.

code3

If you do not want this to display, change it to look like this

code4

I use FileZilla a free FTP client to move files from my web site and my PC where I edit them. It is always a good idea to rename the files on our web site by adding the date to the end of the file on your web site (eg. Functions.php-04-15) before uploading the modified file. This makes it really easy to fix things if you make a big mistake. Just delete your uploaded file and rename the old one to the correct name.

I now get a cen slate when I test my structured data. Good luck with this ourself, let me know how you get on.

,

No comments yet.

Leave a Reply