‘Warning: Missing required field “updated”‘ in WordPress Twenty Eleven theme


This tutorial has been updated for WordPress’ new default theme, Twenty Twelve. Reference this tutorial to fix this SEO issue if you’re using the Twenty Twelve theme.

If Google’s Structured Data Testing Tool reports the error ‘Warning: Missing required field “updated”‘, your Twenty Eleven WordPress theme is likely missing the “updated” microformat. This information is used by Google to include the publication date of your blog posts in Rich Snippet search results and is important for SEO. We found that WordPress’ Twenty Eleven theme does not properly identify this data, but we have a quick fix.

Warning: Missing required field "updated" with Twenty Eleven WordPress theme

As with all code modifications, we advise that you take a backup prior to editing any files.  In /wp-content/themes/twentyeleven/functions.php, locate the function in the following line:

This function provides an HTML output of meta information relevant to the post. On the next line, find the “time” tag and add an additional CSS class called “updated”. Here is the change we just made on line 581 in context:

If your blog uses Twenty Eleven as its parent theme, copy the above function to functions.php in the root directory of your child theme. If the file does not exist, create it with the code below:

Now when you validate your microdata in Google Webmaster Tools, you should no longer see ‘Warning: Missing required field “updated”‘. Let us know in the comments if this worked for you or if you encountered any issues.

51 Responses to “‘Warning: Missing required field “updated”‘ in WordPress Twenty Eleven theme”

  1. Daniel Marquard

    Just a side note, your function may differ slightly from the one in the post as a result of small changes across different versions of the Twenty Eleven theme. As long as you update only ”, you should be fine.

    • Christy Russell

      I’m using Twenty Eleven Version 1.3, have made the simple one word edit which you recommend – time class=”entry-date updated” – and yet I have Warning: Missing required field “updated” error. Any ideas? Thank you very much. This is my page: http://doulanurse.com/

      • Daniel Marquard

        Hi Christy. I just had a look at your website and it appears that your WordPress template is missing a number of standard microformats that Google is looking for, not just the publication date.

        We’d be happy to fix these for you. Feel free to get in touch with me at daniel {at} technosultants.com. Thanks!

  2. Stephen Pate

    Thanks for the code. I just entered the time code “%4$s”

    The references in “a href=”%5$s” title=”%6$s” are reversed href/title but I left mine as is since it works.
    The error is gone…thanks again.

    • Daniel Marquard

      Glad it worked! WordPress somehow shuffled some of those attributes, but they will work in any order. Thanks for letting me know.

    • Ed Allan

      could you please advice me too solve the same issue.
      sprintf( ‘%3$s‘, Still I do have the error. Please help.

      • Daniel Marquard

        Hi Ed. For this fix, simply replace “entry-date” with “entry-date updated”. If you experience any issues, you can always restore from a backup.

        • Ed Allan

          Hi Daniel,

          Thank you, I have done the same, but error is same.

          sprintf( ‘%3$s’,

          • Ed Allan

            span class=”entry-date updated”>%3$s</span

          • Daniel Marquard

            Are you sure that’s the error you’re seeing when you load your blog? The simplest fix for this would be for you to revert to a backup of functions.php and attempt to add the additional “updated” class again. This change should not cause any on-screen errors.

          • Ed Allan

            Could you please click on this link, you will see the error.
            Apologize for the inconvenient. Thank you for the help.

          • Daniel Marquard

            Your website has very few microformats. Are you using either the Twenty Eleven or Twenty Twelve WordPress theme? Your theme would require tags citing the SEO data, such as the below HTML from this page:

            <a href="http://www.technosultants.com/blog/warning-missing-required-field-updated-wordpress" title="8:56 pm" rel="bookmark"><time class="entry-date updated" datetime="2012-12-10T20:56:35-05:00" pubdate>December 10, 2012</time></a>

          • Ed Allan

            It’s Twenty_Ten

          • Daniel Marquard

            Technosultants only supports Twenty Eleven and Twenty Twelve, mainly for this reason; SEO is subpar in Twenty Ten. We are using a simplified version of Twenty Eleven on this blog and we find that it suffices our SEO needs. If you’re not able to upgrade your WordPress theme, feel free to take a look at the HTML for this page to identify the microformats used my Google.

            If you’d like me to add all of the modern microformats to your existing theme, please send me an email and I’ll be happy to assist. daniel {at} technosultants.com

          • Ed Allan

            Thank you Daniel, I just sent you a mail.

  3. wineybrett

    Thank you for explaining this code improvement – it worked for me!

  4. Min Min


  5. Pete Jett

    This was just what I was looking for. Worked like a charm. Thanks!

  6. Rita

    Help me please.., I already change in the line 581 and the error is gone but the rich snippet is gone too not showed. What should I do ?

  7. Gyle Martinda

    nice I get success with your tips. I was get problem on my website http://aen24.com with thesis theme. With your introduction i get success… thanks for sharing

  8. Jean

    I have optimize press – what can I do?

  9. John Roberts

    Thank you so much Daniel. The message, “Error: Missing required field ‘updated'” is now gone because of your advice. From the comments, it looks like you are helping many other people to solve this problem. Great work!

  10. Anita Suijkerbuijk

    Can someone help me with the same error Missing required field “updated” in wordpress theme Twenty Thirteen !!
    Several solutions on Google tried but nothing works for me. Even like this i can’t find the above text in de functions.php.
    Look at site http://www.google.nl/webmasters/tools/richsnippets?q=http%3A%2F%2Fwww.denkaanjezelf.nl%2F
    Can someone please help me ??
    Thx guys.

  11. Amy Moeller

    Thanks so much. For some reason I couldn’t see your example – using a mac. I saw Christy’s comment, found where it said time class=”entry-date and added the word updated so it said time class=”entry-date updated It worked like a charm!

  12. Kirk Neel

    I am new to wordpress and trying to figure this out. I get the same error I am using theme

  13. David Malka

    This worked perfectly! Now I need to figure how to fix the “This is not a verified publisher markup.”

  14. Rahul Jain

    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..

  15. TechByMak

    What about Blogger ?

  16. Gilan Maria

    I am getting the rich snippets message “Warning: Missing required field “updated””
    None of the fixes for twenty-eleven have worked.
    The I checked the source on one of my posts” Windows 8 You and Me Together”
    On line 194 is the HTML code ”
    And on 335 is the value “December 10, 2012 ”
    So the value “updated” is there but the Google snippets tool does not see it.
    Can anyone tell me where my problem is?


  17. Guest

    For twenty Thirteen :
    Add this in “function.php” in your child theme :

    if ( ! function_exists( ‘twentythirteen_entry_date’ ) ) :
    function twentythirteen_entry_date( $echo = true ) {
    if ( has_post_format( array( ‘chat’, ‘status’ ) ) )
    $format_prefix = _x( ‘%1$s on %2$s’, ‘1: post format name. 2: date’, ‘twentythirteen’ );
    $format_prefix = ‘%2$s’;
    $date = sprintf( ‘%4$s‘,
    esc_url( get_permalink() ),
    esc_attr( sprintf( __( ‘Permalink to %s’, ‘twentythirteen’ ), the_title_attribute( ‘echo=0’ ) ) ),
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
    if ( $echo )
    echo $date;
    return $date;


  18. Time Education

    Dear i m using MH magazine Lite on my blog http://freenewsalert.com/ in default team has only date micro formats meta but i wanna add updated time of blog post . please tell me how can i do it without any mistake . thanks for support in advance

  19. James

    I believe I followed the instructions properly. I created a functions.php file in the root directory of my 2011 child theme. And I added “updated” to the time tag. But the result is I get text at the top of my page when it loads…. any ideas?

  20. James

    OK guys… fixed it. Thanks

  21. Warren Redlich

    Tried that just now on Twenty-Ten and it crashed the site. Hmm.

  22. Cezar Cruz

    Thanks!! =D

  23. Garazi Ibarrolaza

    I replaced the code but it doesn’t work for me :) What can I do?

  24. Waldo Pulanco

    thanks! how about on blogspot like me i have the same error check out http://qneblog.blogspot.com
    i hope to resolve this problem to my blog!! thanks!

  25. koolvick36

    please tell me how to fix this error

  26. Mayur Chettiar

    It did not work :( ….i thought it worked but n…my theme is twenty fourteen

  27. Wintch

    I dont get why this error persists. Are WP designers aware of the issue?
    Your solution is working just perfect, but get overritten during updates :(

  28. ujjawal

    Dear Sir,
    After your changes, still the same error is coming in google webmaster tool. kindly help

  29. Deepak Uttam

    Just corrected missing updated error because of your tutorial thanks

  30. Adhitya Chandra

    Still confused, since my theme do not allow me to edit my function, and I’m a newbie in child theme.

  31. Robert Sanders

    Daniel, found the function twentyeleven_posted_on() { code and replaced with your recommended code. However, after a 24-hour period, the same errors are still in place on webmaster tools. Is there something I could have missed?

  32. Pedro

    Let me thank you in advance for this usefull tip. It actually solve my update issue but only in posts. On my wordpress pages Missing: updated and Missing: author still persists. Do you have any tip for that issue. Thanks in advance

  33. greench

    Hi children, what I wouldn’t do, as if a template not of moneychangers at me it is impossible to clean an error of Missing required field “updated” if I send someone from you the template you will be able to help me? I will be very grateful to you

  34. greench

    and also forgive me for my Angliyskiya language, I from Azerbaijan

  35. Lisa

    Just tried, hope this works. I read an article that advices to modify single.php file, which didn’t work for me.
    Thanks for sharing


Leave a Reply