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
- 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!
- Unzip the .zip file into a folder. Place that folder on the same level as your original Hueman theme, under wp-content/themes.
- Copy functions.php from /themes/hueman (the original theme), into /themes/hueman-child-master (child theme folder)
- Add this code snippet from David Tiong’s website. This will fix all errors, excluding archives pages (category, author)
- Remember to switch from the original theme to the child theme, under Appearance – Themes.
- 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.
- Make sure the content.php looks like this:
<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>><!--/.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 AuthorshipAdvertisements