30 Mar

How to Fix Google Rich Snippets Errors for WordPress




google snippet testing tool

Recently, when I tested my website pages on Google Rich Snippets Testing Tool - I found the following three errors.

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

You may also find these errors, so here’s the fix for all these errors.

Recommended Read:
How To Show Author Information in Google Search Results
A Complete Guide to Rich Snippets

Fix “Entry-Title” Error

Go to Appearance> Theme Editor in your WordPress Dashboard.
Open Single Post(Single.php) file.
Hit Find(Ctrl+F) in your editor and look for the_title(). Your can see it’s surrounded by an H1 or H2 tag.

entry title

Replace it with this. Just add class=”title entry-title” in the H1 tag.

entry title google rich snippets

Fix “Updated” Error

This error occurs because Google rich snippet wants to know when was the post updated. So, search for class=”date” in the single.php file and replace it with class=”date updated”.
In my case, it is class=”post-date updated”.

post date update google rich snippet tool

Fix Missing Field hCard Author Error

This tells Google who is the author of the post. Search for the_author() in the same file, and just modify the code like this:

vcard google rich snippet testing

Add the span class “vcard author” and “fn” and don’t forget to close it with </span> tag.

Now check the page again in the Google Rich Snippet Testing Tool and all the errors are gone.

 

Note: Editing single.php applies for single post alone (Home page still remains the same with warnings).  But I’ve also noticed that Google is showing author information even on pages with warnings.

The codes explained above may not work for everyone. So, you can ask any issue you’re facing in comments.Click Here To Like our Facebook Page to get regular jobs, exams and study material updates.



Comments

comments

  • Pingback: A Complete Guide to Rich Snippets [ Infographic ] | Youngblah

  • www.rateretailer.com

    Thanks man, You are the Best

    • http://youngblah.com/ Amit Chahar [ youngblah.com ]

      You’re welcome.:)

  • http://jonloomer.com/blog Jon Loomer

    Can’t find any of this in my Genesis theme. Any other suggestions?

    • http://youngblah.com/ Amit Chahar [ youngblah.com ]

      Which error it is showing? Also, in the recent update of “SEO Plugin By Yoast”, they have added an option to add Author metadata. You can even try that.

      • http://jonloomer.com/blog Jon Loomer

        Amit — The author/publisher stuff is all fine (rel=auth implemented), but the errors I get are regarding the hcard…

        hentry
        Warning: At least one field must be set for HatomEntry.
        Warning: Missing required field “entry-title”.
        Warning: Missing required field “updated”.
        Warning: Missing required hCard “author”.
        hentry

        I don’t use Yoast or any SEO plugin since SEO is built-in with Genesis (and I’d prefer not to use these heavy plugins if I can avoid it).

        • http://youngblah.com/ Amit Chahar [ youngblah.com ]

          Just checked your blog on Google Rich snippets testing tool and Google search. Your Google+ profile link with your photo is already showing below your blog links in search results. So, there’s no need to fix the errors. But still if you want to do it, the fix is same for sure as explained above. But because genesis framework is different, you need to do the changes in functions.php maybe. I need to work on genesis framework and then will get back to you.

          • http://jonloomer.com/blog Jon Loomer

            Okay, thanks. I knew my author info was showing up properly in search results, but since these errors came up I didn’t know if there was something else that could be appearing (or if Google preferred to see things in a different way). Just trying to take advantage if there’s anything else I should be doing!

          • http://youngblah.com/ Amit Chahar [ youngblah.com ]

            No. It is showing important things. Rest won’t make any difference. :)

  • http://techprevue.blogspot.com/ Vinay Prajapati

    Nice tutorial

    • http://youngblah.com/ Amit Chahar [ youngblah.com ]

      Thanks. :)

  • Pingback: Como resolver o problema dos Avisos: Missing required field Title Updated e hCard | Rentabilização: Dicas e Informações reais para Blogueiros

  • http://eyuva.com Vivek Sancheti

    Can you say how to fix this error in genesis ?

    • http://youngblah.com/ Amit Chahar [ youngblah.com ]

      Personally, I’ve not worked on Genesis Theme but I’m sure the process would be same. But you may find these classes and tags in other file than single.php. Just search all the files. And let me know.

      • http://eyuva.com Vivek Sancheti

        i couldnt find them out :(

  • Kristján Már

    Hey man, thanks for a good article!

    However, I’m having a similar issue as Vivek – I’m running a theme called optimizepress and these variables are not present in my single.php.

    On the rich snippet tool all is working except I get the hcard error.

    The preview on the snippet tools shows my g+ image but a normal search does not return it…

    Should I just leave it as is, is the authorship link established even if the image is missing and I’m getting the hcard error?

    • http://youngblah.com/ Amit Chahar

      No, image should show in the Google search results. Tell me your site URL, I’ll look into it.

  • Gilles

    Hi,
    Is there someone who can help me? For days I’m trying to connect my google+ page to my website and it won’t work. Each time I get the Warning: missing required hCard “author”. I already changed code in single.php but no result.
    Is there anyone who can help me?
    Thanks a lot!

    • http://youngblah.com/ Amit Chahar

      Read this post – http://youngblah.com/how-to-show-author-information-in-google-search-results/ and tell me, have you set up Google authorship like this?

      • Gilles

        Hi Amit, thanks for the reply. All settings are as mentioned.

        What I’m trying to do is to get my company picture in the google search results and more information on the right hand side (like in the picture). So I thought that when I link my website to my google+ business page that would be OK?

        But on every tutorial I found that I have to link to my site in the section “contributor to” in my google+ page. But in my business page there is no section like that. This is the case in my personal google+ page. Maybe thats the reason of the problem? I’m trying already for days and no results :-s.

  • fernandesl

    Hi, guys. That post helped me partially. Class=”date” and the_author() don’t exist in my single.php. Is it possible to create them? If yes, how would it look like?
    Please, look at this image. Does anybody know how to fix the errors?