HOW-TO

Fix hentry errors in Google Search Console for WordPress Sites

If you have been using Google Search Console and when you go to Search Appearance -> Structured Data > hentry (markup: microformats.org), you may find several errors as shown in the screenshot. In this guide, I will show you how to fix hentry errors that appear for your WordPress website.

What is hentry?

According to microformats.org, the class hentry is a root class name that indicates the presence of an hAtom entry. hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used, such as news articles.

The hentry schema consists of the following properties:

  • entry-title. required
  • entry-content. optional
  • entry-summary. optional
  • updated. required
  • published. optional
  • author. required
  • bookmark. optional
  • tag. optional

So your blog post must contain: entry-title, updated and author properties to avoid errors in Google Search Console. Fortunately, WordPress hentry is a CSS class declared on the parent element of your blog post.

SEO benefits gained when you fix hentry errors:

Structured data (hentry is one of the data) helps search engines to better understand your content. For example, as shown in the screenshot, I told Google that my post about Optimus plugin is a “review” post. So please dear Google treat it as a reviewed item and display the ratings, reviewer name, etc..

That should prepare your content to online users who looking for particular information, also you will enjoy higher click-through rate (CTR).

You may want to know that this is NOT a search engine optimization hack and it’s not an official ranking sign. You fix issues because you want to make it easier for users and search engines to find you. In other words, if you don’t fix it, it will NOT harm your SEO rankings!

How to fix hentry errors?

As I mentioned, having issues related to hentry is not a big issue for your SEO rankings, so you can disable hentry in your WordPress website and Google will stop showing those errors for you, that is what I call “Dirty Fix“. But if you want to really fix them you will need to do few edits in your theme as hentry errors are actually coming from themes.

The Dirty Fix:

When you add this snippet to your theme’s functions.php file, you will remove hentry from your WordPress and Google will stop showing those hentry errors for you.

*Remember, it is always better to use a child theme.

The Real Fix:

If you need a hand to get rid of these annoying errors,.

Fixing those errors requires some edits in your theme’s files. Unfortunately, themes structures are not the same, so you need to know where exactly the errors are occurring.

The easiest way to figure it out:

  1. Go to Google Search Console -> Search Appearance -> Structured Data
  2. Click on hentry under Data Type column
  3. Note the Page URL column
    1. If it’s a page URL, so the errors probably will be in page.php
    2. If it’s a post URL, so the errors probably will be in single.php
    3. If it’s a category URL, so the errors probably will be in archive.php

The errors that you may find under the Errors column will be one or more of the following:

  • Missing author: which means that the item (page/post) missing the “author vcard” CSS class.

This can be fixed by looking for something like

and then check the parent CSS class and add the classes: “vcard”, “author” and “fn” so the final result would be something like:

  • Missing title: which means that the item (page/post) missing the “entry-title” CSS class.

For this, you need to look for your post/page title and add class=”entry-title” for example

  • Missing updated: which means that the item (page/post) missing the “updated” CSS class.

And for this, you need to find the function that displays the time for your post/page, if it’s there, you will add this class to the time function so it will be something like:

Note: this will make the published time and updated time the same. If you want to get the updated time you need to add this function

and then add class=”updated” to it

Testing the changes:

If you want to make sure that everything is fine, go to Google Structured Data Testing Tool and enter the URL of your post and then click on hentry, you should see all entries.

Final Results

After few days, you will find that the items with errors are going down to zero as shown in this screenshot.

I hope this guide helps you to fix hentry errors in your Google Search Console.

If you have any questions, please post them in the comments section below.