Hueman theme and Google Authorship

Hueman Theme to work with Google Authorship

Hueman theme is one of the best themes for WordPress. I fell in love with the way it is built. One can easily modify it for their own needs. However the theme has some issues with the hAtom microformat. I have made modifications to get it work with the Google Authorship program.

UPDATE 15th of January, 2014: Download my full single.php and page.php files for a quick fix!

I am not going to fully explain what these Rich Snippets are. That is because I’m yet to know them too well myself. You’re just going to have to figure them out for yourself. May the Google Webmaster Tools be with you and more specifically Google Structured Data Testing Tool.

That’s a lot of homework, I know. But the reward is definitely worth it!

Make Hueman theme to work with Google Authorship

NOTE: You must substitute “https://plus.google.com/+HeikkiLahtela” to be your Google+ account profile URL.

1. Edit single.php and replace line:

With this:

2. Edit page.php and replace line:

With this:

3. Google says only to use “rel=author” on the actual content pages.

Do not add “rel=author” link to the Social link on the theme settings on Appearance > Theme Options. I only have there “http://www.google.com/+HeikkiLahtela”. I noticed I have it on the source code even in front page. Let’s see if that matters… 

4. PAGES: Add a custom <h1> tag for every PAGE content.

Edit source (Text tab instead Visual) and add a parameter:

Always remember to test with Google Webmaster tools.

5. Edit single.php and replace line:

With this:

6. Edit single.php and replace line:

With this:

NOTE: This will replace the normal WordPress author link. Normally it links the WordPress feed page of that current user. Now we replace it with Google+ page link. This maybe be unnecessary but it looked better this way for me.


7. Hueman template suggests subpages “You may also like”, this needs some attention as well.

Hueman Theme and Rich Snippets

This means problems with the hatom-feed in Google Rich Snippets tool. There are errors:
Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.

It seems there should be only one “hentry” root class specified on one page. For some reason there are multiple “hentry” specified on the page. They come from <?php post_class(); ?>. I don’t know if it’s really bad idea to have multiple “hentry” on one page. Removing that CSS code also removes “rel=bookmark” entries from the hatom feed. So I just leave them there for now…

8. Set tags to work with hatom-feed:

Edit single.php, move this line:

To inside of <div class=”entry”>, for example put it just after this line:

So there you have it. Remember to test!

There may still be some errors and adjustments I did not notice. I have made authorship work with my site before so it should be working with these settings too. Please comment if you think I have made some errors!

UPDATE 15th of January, 2014: Download my full single.php and page.php files for a quick fix!