Adding hAtom structured data to the WordPress Hueman theme

I literally crapped my pants the first time I saw 800+ hAtom errors, when testing my site out with Google Webmaster Tools. It’s a little amazing why something like this isn’t baked into WordPress themes by default. Nevertheless, we all know how rapidly trends like these shift.

Less whinging, let’s get to work! I’ll just share my fixes on this problem.

Note: This fix is largely specific to the WordPress Hueman theme, a really fantastic theme if I might say so.

Errors encountered when testing structured data

When using the Google Webmaster Tools Structured Data testing tool, you get these errors.

Error: At least one field must be set for HatomEntry.

Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.

Creating a child theme

  1. Best to apply this fix in a Hueman child theme (download sample), rather than editing the actual theme files. No fear of losing modified source code on theme updates!
  2. Unzip the .zip file into a folder. Place that folder on the same level as your original Hueman theme, under wp-content/themes.
  3. Copy functions.php from /themes/hueman (the original theme), into /themes/hueman-child-master (child theme folder)
  4. Add this code snippet from David Tiong’s website. This will fix all errors, excluding archives pages (category, author)
  5. Remember to switch from the original theme to the child theme, under Appearance – Themes.
  6. To fix the remaining errors in the author and category pages, you have to copy content.php from the original theme, into the child theme folder.
  7. Make sure the content.php looks like this:

<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>>
" title=""> /img/thumb-medium.png" alt="" /> '; ?> '; ?> '; ?> ">
<!--/.post-thumbnail--> <!--/.post-meta--> <h2 class="post-title"> <span class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> </h2><!--/.post-title--> <?php if (ot_get_option('excerpt-length') != '0'): ?>
<!--/.entry--> <?php endif; ?> </div><!--/.post-inner--> </article><!--/.post-->

It was a long night, and I was a little fuzzy when putting it all together, but this should mostly be it. Pop a comment if it doesn't work!

Related read: Hueman theme and Google Authorship

4 thoughts on “Adding hAtom structured data to the WordPress Hueman theme

  1. Hello! I followed all the steps that you indicate in the post, but when I turn the child-theme I get blank entire page and can not do anything until I remove the child-theme folder on the server. By doing this I can now access wordpres and activate the normal Hueman theme. We appreciate your help!

    Thanks and forgive my bad English. A greeting!



    1. hey Adrian! Are you having problems with loading the Hueman child theme, or on adding the structured data snippets? Try loading the child theme without any modifications, and activate it. See if this works without throwing a blank page.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.