Share it!

Why do hentry tags show as errors in the Search Console?

If you are using Google’s Search Console, you may find errors related to missing hentry or when checking out the structured data tab. This is very common in WordPress websites and the first thing you need to know is that having this problem won’t harm your SEO scores.

WordPress adds the hentry CSS class automatically when the theme uses the post_class() function, regardless of post type (depending on the theme you’re using). When that happens, Search Console throws errors because the theme does not publish all the required tags associated to hentry.

hentry missing fields

What is “hentry” and what it’s used for?

“hentry” is a CSS class that is added automatically by WordPress to the content block of any post. It is part of the hAtom specification, and tells search engines and feed parsers that there is content that can be syndicated on a given page.

hAtom is a draft Microformat specification (sometimes abbreviated µF or uF) for marking up (X)HTML (using classes and rel attributes) content on web pages that contain blog entries or similar chronological content. These marked-up entries can then be parsed into Atom feeds (XML-based) and, finally, displayed as updates in other websites. In other words: ‘this page/post contains an article that can be extracted and displayed in feeds‘.

With Microformats, you can send & publish things like events, business cards, and product reviews as meaningful XHTML that a person can read in a browser, but a program can import, index and remix as native data by simply adding a few CSS classes or “rel” attributes to the code.

Websites such as “People Magazine” and “Blogger” use hAtom markup to share its updates with bots and search engines. It is one of the several Structured Data formats currently used for providing information about a page and classifying the page content. The hentry specification includes the following properties (some are mandatory and some are optional):

  • entry-title (required).
  • author (required).
  • updated (required).
  • entry-content (optional).
  • entry-summary (optional).
  • published (optional).
  • bookmark (optional).
  • tags (optional).

Fixing the ‘Missing required hCard / hEntry’ error

As shown above, wherever there’s an hentry tag, there must also exist entry-title, updated and author properties to avoid errors in Google Search Console.

The easy fix

Fortunately, hentry is a CSS class added by WordPress to the parent element of your blog post. So if all we want is to get rid of this CSS class, we can apply a simple filter to remove the hEntry CSS class from being inserted into your posts. This is a dirty fix and it will also destroy the hAtom tag from your post. As mentioned before, it won’t affect SEO ranking in search engines, as most don’t use hAtom data. However, it will prevent feed parsers from detecting hAtom tags and will not add your posts to their list.

Fixing the hentry problem for real

In order to get rid of the Search Console errors and letting feed parsers to syndicate content using hAtom feeds, you need to add the missing required fields (entry-title, author and updated) using the microformat markup.

Below is a very simple example showing how add the required tags to a WordPress theme in order to comply with the hEntry specifications. That’s it, all hAtom classes are added for posts and pages and Webmaster Tools don’t show microformats errors.

You  can also add hAtom tags by implementing WordPress filters, as shown in the following example:

Either way, fixing errors once we fix hentry errors, the Structured Data Testing Toll should display something like this for each tag:
Fixed hentry Structured Data

Final remarks

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 but omit adding the rest of the hAtom required tags, causing errors in the Search Console.

Since no one like those red errors from Webmaster dashboard we can either delete the “hentry” tag from the HTML of our posts or respect the entire hAtom microformat markup and add the missing CSS classes.

Either way, after making changes to your theme files, you must verify that your Structured Data markup does not contain any errors by using Google’s Structured Data Testing Tool. Errors might remain in the Search Console for a few days, as statistics are not real-time, but errors will go away in a few days.

Share it!