How to fix “missing required fields” warnings in Rich Snippets Testing Tool

Several days ago I checked what Google’s Rich Snippets Testing Tool thinks about this WordPress-based blog. The results were not bad in general, but also not good enough for my understanding. While Google was able to detect that I am the owner of the blog and presented a link to my Google+ Profile, and the main page of the blog was correctly detected as a list of blog entries, each one with the permalink, a list of tags and a list of categories – the most important things were missing: the title, the date and the author of the post. The following errors were displayed for each blog entry:

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

Obviously, I started to check what can be done about that. This research lead me to the long list of articles about microformats, how they are used in Google’s Rich Snippets and how they are handled by WordPress.

To summarize what should be done:
In order for Google to properly detect the “missing” information (which actually appears on the page), it should be properly marked with meta-information elements (in this case – hAtom microformat). This is accomplished by adding special class to the HTML elements containing the relevant text. Sometimes the nearest surrounding element contains much more text than needed; in this case you can enclose the relevant part of the text in the dedicated “span” element – in this way you do not break existing formatting.

For the blog post, the title of the post should be marked with class “entry-title“, the posting date should be marked with class “updated” and the full name of the post author should be marked with class “author” accomplished by elements from hCard microformat – “vcard” and “fn“. The sample for this post will be:

<span class=”entry-title”>How to fix “missing required fields” warnings in Rich Snippets Testing Tool</span>
<span class=”updated”>December 24, 2011</span>
<span class=”vcard author”><span class=”fn”>Anton Khitrenovich</span></span>

Now, let’s take a look on how to do this in WordPress:
As you can see, the information we need already appears on the page, so it should be pretty simple to mark it with relevant microformat. The simplest way that I found to implement the changes was to modify some theme files directly*, via Theme Editor (you can find it under “Appearance” => “Editor” in the Admin Interface of your blog). Here is an example of such modification for the main blog page (“index.php” template) of Andreas09 theme; note that “class” attributes besides the “date” are new. (The whole snippet is indented for easier reading.)

There are two additional templates you will probably want to modify – “single.php” is the template of the single post and “archive.php” is the template for various post listings, such as posts by date, by tag and by category. You may also want to modify “search.php” (the template that displays search results), but I’m not sure about the actual effect of this modification.

Disclaimer: Implementation of the changes I suggested in your blog is at your own risk!


* Notes about direct theme modification:

  1. No, I did not find any WordPress plugin that can insert the required markup for you. It does not mean that such one does not exist at the moment of reading, especially if you read this page much later than the moment of writing.
  2. Yes, I know that touching the theme files directly is not recommended. In case the theme you are using for your WordPress blog is updated frequently (or at least maintained), it may make sense to wait for the theme update or just ask the author to add the microformats support. This is not the case for Andreas09 (used in this blog), which was last updated more than 5 years ago…

55 thoughts on “How to fix “missing required fields” warnings in Rich Snippets Testing Tool

    1. For the first site, the change goes to the “content-single.php”. Find <?php the_author() ?> (somewhere around 20-th line) and surround it with two spans – one for class=”vcard author” and another for class=”fn”. This should do the job for you.

      The second site (TBH), while built on WP engine, does not look like a classic blog. I would not add microformats there at all.

      Hope it helps.

  1. It might be a silly question, but what are the implications of these warnings? I am reluctant to touch the files and it seems to come up fair enough in Google, at least using the testing tool. Thanks!

    1. In case of your site – probably not too much of implications.
      I see those warnings for individual entries on the listing pages. However, the listing page itself has proper publisher data (goes to the G+ page) and each article has proper author data. So, adding author data for the individual entries also will probably not provide any additional info for Google.
      The only entry that may bring some benefit is publishing date. Google displays this data near the search result when available and some people may prefer to click the link, which clearly shows that it was updated recently.

      As usual, the decision is yours 🙂

      1. Awesome, thanks so much for taking the time to check it out for me! I’ll see if I can do something about the publishing date as I often look at that myself when I look stuff up on Google. But thanks again!

  2. Hey great article!

    I was just about to do some modifications to my theme, but was wondering if you would take a look at the warnings I get from the Google rich snippet tool before I do anything? I personally don’t like them, but it seems as though everything is setup correctly.

    Looking forward to your thoughts – thanks!

    Nick

    1. I see two warnings for your site, both related to the individual entries and not to the feed itself – one about “updated” timestamp and another about authorship hCard. According to the spec, both are mandatory. Yet, I see that authorship is detected correctly on the target page results, so it is mostly format compliance question. Regarding the update time – I see the “published” element in the markup, which (in theory) can be used to detect update time. Not sure whether Google does it or not, given the fact that “updated” field is also mandatory. Unfortunately, the Rich Snippets tool does not show the update time even for the pages where it appears correctly, so we cannot know if this assumption is correct. On another side, rating data that you have there may be considered as more interesting by some people.

  3. Hi,

    Great article, thanks for the info. I too have the “Warning: Missing required field “updated”.”, if you just look at my domain as a whole, the error shows up on every separate post. So would I need to edit my theme then? Looks like it has to do with the class of the date the post was published. I am using Genesis Framework, do you know if the change would be in index.php, or could I just change it in a child theme or custom css?

    1 more question, I just signed up Kara and Kelly for the Google Authorship and it looks like they are both setup nice (not showing in SERP yet after 3 days), but when you check the main domain it says it is not setup or may be set up? With 2 authors, how do I assign Google Authorship for the main domain, or do you just want it for each individual post?

    Thanks!

    1. Re update date –
      You are right, it has to do with the class of the date span. It is marked with “published”, but not with “updated”. See my comments to Nick above – he has similar issue in the theme he is using. Anyway, I would recommend you to contact the authors of the Genesis Framework and ask them if they plan to update the class there.

      Re multiple authors –
      Unfortunately, I have no advises here – my blog is solely mine 🙂

      Good luck there!

  4. I have a few questions.

    The thing is I use WordPress more as a CMS than a blog.
    On my pages I prefer not to show when the page is updated and have commented this out, but for this reason I can not remove the error regarding “Missing required field”.

    Are Google going to punish this?

    I have tried to Google the issue, and maybe see if I could find some instructions on how to remove hatom completely from the WordPress template, but I don’t find any suggestions regarding this.

    Any help would be appreciated.

    1. Well, if you say that the updated date has no meaning on your site, you’ll probably get no benefit if Google would be able to find it. I guess you can just ignore this warning.

  5. Nice article. I tried to do what you mention, but it seems different with my website. I use HostingMoz themes in WordPress, and I could find it.
    I also have same problem on ht rich snippet testing tool like that, but I still didn’t find any suitable solution. Anyway, thanks for the info

  6. I am Using Genesis Framework and I couldn’t find these lines anywhere in my theme. Please Can you explain me how To solve this problem on Genesis Framework?

  7. Hello
    I am also facing this type of problems, thanks for sharing this type of articles.Now i will solve my problems with the help of your tutorials.

  8. Hello, I have the same problem with my website http://www.rahulkcjain.com
    I could not find the given codes in my single.php file. I am using the tonic theme of WordPress and have been trying to fix this issue since a week now.
    it would be great if anyone of you can provide me a fix for the same. Also, I am a newbie to the coding world, so step by step instructions would be appreciated..
    thanks in advance..

    1. Hello Rahul,

      The Tonic theme is a bit more complex than one that I’m using here, and consists of more building blocks. In your case, the right code to modify appears in “content-header.php” template file. BTW, I see that in the latest version of Tonic theme the authors took care of “entry-title” and “updated” marks, so all that you need to handle is the correct detection of post author. A hint for you – check line 29 🙂

      Good luck,
      Anton.

  9. Anton, I’m having difficulty getting this to work for my site, my homepage is a list of the most recent 5 blog articles, and I get the errors about author, undated and entry-title five times each.

    I can view the source code for the individual blog entries, and everything is there, but I still get the errors, can you shed any light?

    Thanks

    Declsn

    1. Hope so 🙂
      I guess the reason is that the homepage is prepared from different template than the individual entries. Take a look at “index.php” and “archive.php” to make sure they are also updated.

      BTW, I see that in the “single.php” only day of the month is marked as update date. Not sure it is what you intended to have there.

      Good luck with microformats,
      Anton.

      1. Anton, my index.php is pretty empty, none of the elements exist here at all, can you suggest where I should include the additional markup.

        I’ve tried a few places with just the Author, just to see if I’m making any headway, but nothing I do seems to have any effect.

        Sorry to be a pain.

        Declan

      2. Anton, that’s it!

        I’ve just updated post.php as a test and the “Missing required field “updated”” has gone away.

        I’ll do the rest next.

        Thanks so much for this, it’s much appreciated.

        Thanks for your time and you help.

        Declan

  10. Hi, most of this has gone well over my head as I am a non techie
    I am getting these errors on my page and like a previous poster I would not like to alter the coding.
    Error: Missing required field “updated”.
    Error: Missing required hCard “author”.

    My site http://www.asharart.me.uk
    Theme: Yoko
    Should I be worried about these errors? and as a non techie what is my best course of action?
    I have noted a decrease in drop in traffic to my site could these be a reason for the decline
    Best Sharon

    1. Hi Sharon,

      Given that you see some decrease in traffic (and probably in ad revenues as a consequence), I would say that in your situation the best will be to hire a professional consultant. While I’m a techie :), I’m really not good enough in SEO and related to give any advises in the area.

      Best,
      Anton.

  11. Hey,

    Thanks a lot for this helpfull post. However, like several other, it doesn’t work on my website: http://www.car-engineer.com
    Using the theme Awake 3.6, on multi-site…

    Do you think I need to update the single.php with a copy-paste of your code? I doesn’t work…

    Any idea to make your code working?

    Thanks a lot in advance.

    1. Hi,

      I don’t have Awake theme in my install, and it costs much more than I can afford just to try it out.
      Maybe it is a multi-site that screws things up – no experience with that either.

      Unfortunately, can’t help here. Sorry about that…

Leave a Reply to Mikroformáty + tagy + autorstvo | Tak.skCancel reply