Fix structured data errors (HATOM) in Google Webmaster Tools

Feb 152014

If you have a site based on WordPress with Suffusion theme and check this site with Structured Data Testing Tool from Webmaster Tools -> Other Resources, will 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”.

Let’s see what’s happens and how can solve the problem.

According to “hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used, such as news articles. hAtom content is easily added to most blogs by simple modifications to the blog’s template definitions”. This microformat is implemented on any site by adding it’s specific classes to markup. In this case classes aren’t used for styling elements but for highlighting the elements of microformat. hAtom wasn’t written for Google, was invented for feed readers to know which elements are contained in a post. And Google just read these information’s for knowing how to format their “rich snippets” – those few lines of text that appear under every search result.

Because WordPress is a CMS used basically for publishing articles/blog posts, almost all WordPress themes, if not all, add classes like “hentry” or “hfeed” for content. In Suffusion for general classes of an article is called the WordPress function post_class() which insert the class “hentry”. Those classes are parts of hAtom microformat, telling to feed readers that our sites contains posts. But Google crawler interpret those classes as we want to get rich snippets based on microformats even on sites where we don’t need this.

On a regular site, we don’t need these rich snippets because they will look exactly like actual “poor snippets” – a title with an excerpt of the post. Even we can, for actual snippets, to add exactly the words we want for excerpt, by using SEO plugins (or SEO options from Additional Options for Suffusion). More than that “Marking up your data for rich snippets won’t affect your page’s ranking in search results, and Google doesn’t guarantee to use your markup.” ( In other words those structured data don’t help a site for SEO, don’t have any influence in searching process, may have influence only in the displaying of search result.

But don’t think that rich snippets and structured data are useless, I don’t say that. If you write reviews about some domain or your site organize some events, or present cooking recipes,  a nice look of Google snippets can attract more visitors on your site. But this is the plugin territory, Suffusion is not written for recipes, nor for reviews or events, Suffusion is a general purpose theme which is called to display WordPress regular posts.

Anyway, no one like those red errors from Webmaster dashboard. Of course, for correcting these errors, need to respect the entire hAtom microformat markup and add the missing classes in the markup. Almost everywhere on the web is suggested to add these classes in theme templates but will have a hard time for doing this in Suffusion because for generating the content are used much more files than single.php or page.php. But David Tiong proposed on his site the most elegant solution for fixing hAtom errors.

So, in function.php of your child theme of Suffusion add just a function:

That’s it, all hAtom classes are added for posts and pages and Webmaster Tools don’t show microformats errors.

P.S. Read the comments too, some visitors wrote there improved codes or provide links to solutions for other systems like Blogger. URI:  


Experienced web developer and graphic designer. Former consultant for Suffusion theme and former moderator on Suffusion Support forum. I teach others while learning myself.

Google+ Profile

    Google+ Page

 Leave a Reply

(Your comment will be published. To contact me privately, use the contact form.)

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

  54 Responses to “Fix structured data errors (HATOM) in Google Webmaster Tools”

Comments (52) Pingbacks (2)
  1. Thank you Rehan,

    I don’t use Blogger, so I don’t know if the solutions from your link are actually working, but maybe they help someone to solve the issue.

  2. Hi Martin,

    Thanks for visiting and thank you very much for this piece of code.
    I hope to help people to solve their problems.

  3. Good sharing…
    But some people facing and asking about some more errors here are some solutions for them
    I just found it on

  4. Hi,
    As some people are having problem with tag pages and the blog page I figured I’ll post my slight variation to this solution.
    I seperated is_home and is_archive to two new if statements.
    Change “Projekt med: ” to whatever you want to have as a prefix for the tag name.
    I also changed return to echo and hooked the function into wp_head instead of the_content.
    Hope it helps someone and thats for your original solution!