Fix hAtom microformats – at least one field must be set for HatomEntry

Age of Article Warning:
This article was originally published 67 months ago. The information, tips and techniques explained may outdated. Examples shown on this page may no longer work. Please consider this when viewing the below content.

If you’ve been using Google’s Rich Snippets Tool, you might have come across an error for HatomEntry. Under the Extracted structured data, errors may be seen such as:

“Error: At least one field must be set for HatomEntry”, or “Error: Missing required field “entry-title”.

What is hAtom?

According to, “hAtom is a microformat for identifying semantic information in weblog posts and practically any other place Atom may be used … is easily added to most blogs by simple modifications to the blog’s template definitions … hAtom is a microformat for content that can be syndicated”

If Google is testing for hAtom microformat in web pages, then it would be wise to assume that it must play a part in how Google indexes blog articles using microformats.

There are different ways that you can fix this issue, however the basic requirements are that certain classes are added into your blog page’s source code.

  1. “Hentry” * must appear in the article class or the post class such as:
    <article class="hentry"></article>

    *If you are getting the HatomEntry error on Google Rich Snippets Tool, then this class name must already exist in your page’s source code. View the source code and do a search for “hentry” to verify.

  2. “Entry-title” must appear as a class name in the title:
    <h1 class="entry-title">Title of Blog Post</h1>
  3. “Updated” must appear as a class name for the date the post is modified or published:
    <time class="updated"> December 29th, 2013</span>
  4. hCard “author” fields must also appear by adding:
    <span class="author vcard"><span class="fn">Author's name</span></span>
  5. “Entry-content” class should be added to your blog article’s content:
    <div class="entry-content">
        <p>the text content of the article</p>

How to modify the source code to fix hAtom errors?

There are different ways to modify your code. You could edit the single.php template file in your theme or childtheme, or any other files that control your blog article pages, and add in the extra class names into the correct spots.

Alternatively, and I think that this is probably an easier modification for people who are unsure how to modify post templates, you can add the below code to your functions.php file of your WordPress childtheme. If you use a custom mu-plugin for your website then you could add the code there instead.

The code contains 2 functions. The first function will use the WordPress filter hook for “the_content” to add the class of “entry-content” to the article. To add in the other essential hAtom fields, the second function will add a short sentence to the end of your post article, which contains updated time, post title and author, with required microdata.

//mod content
function hatom_mod_post_content ($content) {
  if ( in_the_loop() && !is_page() ) {
    $content = '<span class="entry-content">'.$content.'</span>';
  return $content;
add_filter( 'the_content', 'hatom_mod_post_content');

//add hatom data
function add_mod_hatom_data($content) {
	$t = get_the_modified_time('F jS, Y');
	$author = get_the_author();
	$title = get_the_title();
	if(is_single()) {
		$content .= '<div class="hatom-extra"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
	return $content;
add_filter('the_content', 'add_mod_hatom_data');

This is the result now when testing with the Google Rich Snippets Tool:

hAtom microdata

I have added some css styling to the extra sentence that is added to the end of each blog post, as I prefer to display the last modified post date, however if you would prefer to hide it all together you can:

/* style for extra sentence */

     .hatom-extra {font-size:10px; font-weight:400; font-style:italic;}
     .hatom-extra .entry-title {text-transform:uppercase;}

/* alternative style to hide sentence from view */
     .hatom-extra {display: none;}

This article has become a very popular topic of discussion, and a good source of information for WordPress users around the world. I have spent a great amount of time trying to assist where possible in the comment section below.

As a result of discussions, I have decided to spend time putting together a video tutorial that expands on the instructions in the tutorial above, to help those who are still unsure how to implement the solution.
This video is available for a small price of an average cup of coffee here in Australia. If you would like to purchase, to show your appreciation of my efforts in helping others fix hAtom errors, then that would be nice.

– purchase no longer available. Video still available below for members.

DT hAtom Error Removal Plugin

I have also just released DT hAtom Error Removal Plugin, if you prefer to use a plugin – View plugin details and payment options

Premium Club Members can view video below:

217 thoughts on “Fix hAtom microformats – at least one field must be set for HatomEntry”

  1. Hi David
    Great article. I set up a child theme and functions file in it and added code but nothing happened. My blog posts are fine. The issue is on my home page and 2 other static pages that have blog excerpts on them:

    The following errors come up 15 times on the 3 pages:

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

    help woul be great thanks


    • Hi Moray,
      Glad you found it useful. Hope the following is helpful for you.

      (1) The code is not working on your single blog post pages because you’re missing the “hentry” class those pages. Consider adding “hentry” to either the body class or the post class for your single.php template. Or alternatively you could use a function to add the class to the current classes.

      (2) To add hAtom code for blog archive pages and home page (which do have the “hentry” class for the posts), you could use a conditional function to try modify the_excerpt on those pages and add the missing fields information

    • I could not find those files on my theme editor. The names were close, but no dice. Looking at the files that are close, those codes do not appear.

      To fix the problem, use the Google Webmaster Tools Data Highligher. The link is right under the Structured Data link where the errors occur.

      Google is not sure about dates, titles and authors. They just want you to highlight them. Google will then give you a code to paste into the top of the HTML file of your post. (press ‘Control U’).

  2. Thanks much for this. I’ve been searching for days trying to fix the error with a template that didn’t lend itself toward easy fixes.

  3. Argh — while it fixes the structured data issue, I now get this error message:

    Warning: Cannot modify header information – headers already sent by (output started at /home1/USER/public_html/wp-content/themes/theme-child/functions.php:12) in /home1/USER/public_html/wp-includes/pluggable.php on line 896

    Any ideas?

    Thanks again.

  4. Last one for me. Child theme functions file had an extra space at the very end. Fixed and good to go. Thank you.

    • Hi Ramit,
      Glad to hear that you were able to identify your “headers already sent” error and that you found the solution to your search here

  5. Thanks for the quick response David and the concise answers however i dont know how to add hentry class in the templates nor which function to add or how to really do it as i only have very basic skills that ive picked up along the way – im not a designer or coder -so any help would be much appreciated – i did try using firebug to find post class etc but im very nervous about changing.editing/adding to code im not sure about as i dont want to break anything
    thanks alot


    • oh and just to say i did put your //mod content into a child theme but nothing happened? I put it in and then checked google structured data testing tool but dont know what i did wrong…after i put it in do i need to clear cache?

      many thanks again

      • Hi Moray, no problems, try adding the following function which looks to see if your theme uses post_class and adds “hentry” to the list of classes. Test it out and use the Google Rich Snippet Tool to see if it then adds the required fields for a single post.

        //add hentry class to single post pages - wont work if theme not using post_class
        function hatom_mod_post_class ($classes) {
        if (is_single() ) {
        //add 'hentry' to the $classes array
        $classes[] = 'hentry';
        return $classes;
        add_filter( 'post_class', 'hatom_mod_post_class');

        Let me know how you go, if this works, then we can try something for the home page and blog archive pages also

        Also as you are running W3TC you will need to clear the caches whenever you make changes to your sites code and css

          • okay tried that. Put code in child theme it did nothing except add this snippet to the header:

            //add hentry class to single post pages – wont work if theme not using post_class function hatom_mod_post_class ($classes) { if (is_single() ) { //add ‘hentry’ to the $classes array $classes[] = ‘hentry’; } return $classes; } add_filter( ‘post_class’, ‘hatom_mod_post_class’);

            then i removed it reemptied cache and got this error:

            Warning: An unexpected error occurred. Something may be wrong with or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to Please contact your server administrator.) in /home/mutantsp/public_html/wp-includes/update.php on line 120

            Looked that up and it seems like a common issue but now im stuck with an error i dont understand and still no closer to solving issue…still keeping the faith though. Any thoughts?

          • Hi Moray,
            how did you go were you able to resolve your error when clearing cache, I haven’t heard of that one before.

            The code snippet only looks to add the extra post class on single post pages, not modify any other code, so adding to your childtheme’s functions.php along with the other code snippets above that you are using, should only be making a class change?

  6. Ah, I didn’t think of adding tags to the blog front page itself. If you come up with that code, I’d love to see it. Thanks for being so generous with your time, David.

    • Thanks Ramit,

      Happy to help out when I can, though the variations between themes and how the WordPress websites are setup means that what works on one site, often won’t work on another.

      Depending on how the blog page is setup, you may be able to modify the same code in the post above and change the line:

      if(is_single()) {

      if (is_home() || is_single() || is_archive() ) {

      to also add hAtom information to the blog page and archive pages.

      Another possible method would be to make a similar function that looks to add the hAtom code onto the end of blog page excerpts using add_filter( ‘the_excerpt’, ‘hatom_add_to_excerpt’);

  7. Hi David,
    I read on WordPress forum that it is typically a crackdown generated by Google to prevent pages from ranking better. Is it true? Is it a concerning issue?
    I’m getting the following three errors on 753 blog posts:

    Missing: author
    Missing: entry-title
    Missing: updated

    Shall I attempt to solve the error or wait for the WordPress or the Google to fix this in their next updates?

    I’ll appreciate your time and help.
    Thanking you.

    • Hi Mousumi, thanks for your comment. I guess that only Google really knows how they are using rich snippets in their search algorithm. We are only guessing based on observation of results and researching page structures. However if it is showing up as an error on Google’s Rich Snippet Tool, then one must wonder if it is important.

      I would say that Google Authorship is definitely the most important aspect of using the Tool, but anything else is probably a bonus

  8. Hi David,
    I followed all of your steps and till now my website’s home page and posts as well were appearing properly in google rich snippet’s tool but all of sudden it is saying :
    Error: This information will not appear as a rich snippet in search results, because it seems to describe an organization. Google does not currently display organization information in rich snippets
    Error: Missing required field “name (fn)”.
    I have no idea why this is happening? And also I am not able to get my image on google search results. I checked using chrome developer tools and all of the tags are implemented as suggested. Could you look at the website and tell what is the issue for this error?

    • Hi Vivek

      I took a quick scan over your site. Couple of things might help- Looking at your website using a text browser “Lynx” shows that there is no standard text content on your blog pages, I see that you are showing blog content in an iframe, so Google bots won’t be able to crawl your content – so this may affect whether Google will show your image as the author, even though you have added the markup.

      Second is that you have set your site up as .org (an organisation) so different markup applies to organisations. You might try adding a class of “org” as well as your class of “fn” and check if this helps. I haven’t marked up for .org sites before, but make some changes and see how you go

  9. Hi David,

    I saw a number of errors in webmaster tool saying missing author, entry-title and updated. Is this the reason for the site not showing up well now when one searches? I have nothing listed under manual action errors. And if that is the case, it seems that if one does correct it, there is no place to click for a reconsideration request, since that request form only appears if one has manual action errors. Just wondering if you know if there are penalties involved if one has missing author, entry-title etc or if it’s more a suggestion. Thanks!

    • Hi Debbie,

      Google won’t divulge exactly how their algorithm works, and it changes continuously. Where your website pages show up on the search results page depends on many factors and Google tries to serve up the most relevant results for whatever is typed into the search bar. At the moment, the best options for checking your website markup are the Google Rich Snippet Tool, Webmaster Tools and other Validators provided by SEO companies.
      I don’t know of any penalties for not having hAtom markup on your individual blog pages, I think most important is your Google Authorship markup

  10. Hi David,

    I am also getting errors for “updated” & “Author”.
    I am not very good at coding. Could you please suggest what should i change?
    I am using “newsworthy” theme & the functions.php has following code

    function newsworthy_posted_on() {
    printf( __( ‘Posted on by ‘, ‘newsworthy’ ),
    esc_url( get_permalink() ),
    esc_attr( get_the_time() ),
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
    esc_attr( sprintf( __( ‘View all posts by %s’, ‘newsworthy’ ), get_the_author() ) ),
    esc_html( get_the_author() )


    • Hi Abhyan,

      You shouldn’t change your theme’s functions.php file, you should have a childtheme and make your modifications in the functions.php file there. Otherwise when you update your theme, your changes are overridden.
      Alternatively you can create an mu-plugin and add the function add_mod_hatom_data into that. If you want to change the theme’s existing post meta data to include the code, then this means modifying the actual post template. Again it is wise to setup a childtheme and copy the post template into that before attempting changes.

  11. Thanks so much for this code that is applicable at the blog post level. Like so many, I have been attempting to solve these hatom errors for the past few days. Now for the archive, product, & page level. Any suggestions?

    • Once again great post. I added the is_front_page() to your line of code so it now reads:

      ( is_single() || is_front_page()) {

      and it fixed one of the four structured data errors I have on my home page. 11 errors to go.

    • Hi Jason,

      Thanks, glad you were able to implement the code on your website. Have you also tried using is_home() and is_archive() to see if it will add the code onto your main blog page and your archive pages?
      An alternative is to try to add a similar function that adds the code onto the excerpt, in a similar way that the code is added onto the_content

      • Yes I tried both. is_front_page is more applicable because it is a static home page. is_archive applies itself to my product directory page for a single item as opposed to all products on the page. i am thinking that a function or variant of the_excerpt is what I need for my blog archive page. Unfortunately I have been renovating a bathroom lately and setting tile so I haven’t got a chance to test any of these ideas. :) Although I have been driving my carpenter friend crazy with site design specifics & coding details etc…

  12. Hello David, thank you for the clear article. I have implemented all the code that you have mentioned in your article. And for the most part with worked perfectly. Using the Google Structured Data Testing Tool I am seeing that it is showing all the updated fields. My problem is that under all correctly shown data it is still showing those errors. I can’t seem to figure out why and was wondering if you’d be willing to lend me a hand with it.

    The errors I’m still seeing are:

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

    P.S. I’ve subscribed to followup comments so if you do take the time to respond I’ll see it.

    • Hi Damien,

      that’s great that you were able to implement the code. A quick lookover at your website and I see that the errors are caused due to the sidebar widgets “recent posts” and “popular posts”. The widgets have the “hentry” class in the post class and so Google looks for the hAtom fields in each of those also. I don’t know whether you might be able to modify the widget code and remove “hentry” class.

      • Thank you David, you are awesome and correct. I temporarily disabled those widgets and the Structured Data Testing Tool showed no errors. Now I just have to figure out how to remove the hentry class.

        You’ve already helped me out a ton, but a quick question. Is there a simple way to remove the hentry class and leaving the rest of the widget the same? Or would doing that require that I remove code like ect?

        • Thanks Damien.

          On second thoughts “posts” in WordPress have “hentry” added to the post_class() automatically by the wp-includes/post-template.php, and you don’t want to try modifying the WordPress default-widget code.

          What you need to do is use a plugin for displaying recent posts and popular posts in the sidebar, and then modify the output of that plugin so that it doesn’t call post_class() for the post class in your recent posts and popular posts. This way it won’t automatically add “hentry” class.

          I see that you are using Flexible Posts Widget Plugin, and I quickly popped across to the plugin page on WordPress and looks like author has given instructions on how to add a custom html output template, so you might be in luck.

          Why not give that a go and perhaps in your custom template change:
          <li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

          <li id="post-<?php the_ID(); ?>" class="post">

          You may need to add further classes besides just “post” to get the format looking correct, see how goes.

          • Wow, thank you David! I can’t believe you went to all that trouble to help me out with this problem. I followed your clear and helpful instructions, ran the Structured Data Test and I’m seeing green across the board.

            I really do appreciate all the help and for practically figuring out everything and posting it for me in simple easy to follow yet detailed instructions.

            Hope you don’t mind if I follow one of your social networks, I feel there’s a lot more I could learn from you. Thank you again David, you’ve be incredibly helpful.

  13. hi David I was on to you a while back about missing author, update and title and had a bit of a problem with fixing it. Have beeen really busy but going to start again. Below is a piece of code out of my single.php. Am I right in thinking this is where i should be making the changes:

    <a href="” rel=”bookmark” title=””>

    | | post_date); ?>

    much appreciated

  14. hi David I was on to you a while back about missing author, update and title and had a bit of a problem with fixing it. Have beeen really busy but going to start again. Below is a piece of code out of my single.php. Am I right in thinking this is where i should be making the changes

    <a href="” rel=”bookmark” title=””>

    post_date); ?>

    • Hi Moray,

      If you are thinking of adding that missing “hentry” class then probably looking to add it to where the post class is, so something like

      < div class="post" >

      maybe change it to

      < div class="post hentry" >

  15. Hi Daivid,

    I tried the code but it did not work. I use Foxy Elegant Theme. May be i did not place the code at proper place. I added in to Theme Functions. PHP at the end.

    I tried adding both codes. But nothing worked.

    • Hi Rehana,

      the code should work with Elegant themes, the posts use the single.php template. Please double check that you have copied the code correctly. Please note that you shouldn’t be adding the code into functions.php of the Foxy theme directly, you should have setup a childtheme and be adding custom functions to a functions.php file in the childtheme, otherwise your changes will be overridden when you update your theme in future.

    • Hi Robert,

      Yes I think that you don’t have the option for modifying themes or code on However, you already have “hentry” and “entry-content” markup in your blog posts, all you need is the “updated” and “author” markup.

      So I suppose you could try manually adding into each blog post, at the end of the post content (add in the editor box using the text editor) :

      <span class="entry-title">ADD TITLE OF YOUR POST</span> was last modified: <span class="updated"> ENTER MODIFIED DATE</span> by <span class="author vcard"><span class="fn">ADD YOUR AUTHOR NAME</span></span>

      It might work.

  16. Thanks so much for the help, David! I added the code to the functions.php file and that seem to have fixed the errors for the actual blog post pages, which is awesome!

    However, I’m still getting errors for the static pages like the ‘about’ page.. ‘contact’ page, etc.. It’s error on :
    Error: Missing required field “updated”.
    Error: Missing required hCard “author”.

    Do you have any suggestions on how we can fix this for the static pages as well?

    Thanks for your help!

    • Hi Alex,
      thanks for the feedback. If you want to try implementing hAtom on your pages, as well as posts, then you either need to modify the conditional tags to include adding the function onto pages, or alternatively set up a similar function that targets only the pages on your website, not the posts, archives or front page, and add the author and post updated information to that.

      If adding the add_mod_hatom_data function above to your pages, then try modifying the line
      if(is_single()) {

      and change it to
      if(is_single() || is_page()) {

      • Hi David,

        I would love to have the hAtom turned off for my static pages and keep it tourned on for blog posts. I have to many errors on google webmaster tools.
        How to do that? Can you please explain? (I have SEO plugin for Yoast).
        Many thanks!

        • Hi Berry,

          You could try a function that targets all pages except the post pages, using WordPress conditional tags, and try removing the “hentry” class from the post class. This might work depending on how the theme’s template pages are setup

    • Anil, it is always better to have a child theme setup for your WordPress theme, if you intend to make modifications to the theme’s files such as style.css and functions.php. Otherwise any changes you make will be overridden in any future theme updates. However, if you only intend on making small occasional changes, then the alternative is to use plugins.
      There are probably plugins available that allow you to setup custom post templates or add code onto pages.
      For the functions above in the post, your alternative to child theme is to create an mu-plugin folder inside wp-content folder, and FTP a php file into that, with the custom functions.

  17. Hi! David, I followed your guide here in my single.php but still getting this errors:

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

    Any idea what of what I’m doing wrong?


    • Hi Xavier,

      looks like you have worked something out, put one of your blog posts into the Rich snippet tool and not seeing any error messages, that’s good

  18. Hi David!! I added the code to functions.php but it doesn’t work, the 3 errors still appear, any suggestions?? I also added the code of the classes or something that you suggested to someone but doesn’t work either!

    • Hi Richard,

      The code seems to be working for your main blog post content, however your sidebar uses a “Recent Posts” plugin which is adding “hentry” class. Please see my comments for @Damien Zander above, which talks about “hentry” class in sidebar

  19. Thank you David, you are awesome and correct. I temporarily disabled those widgets and the Structured Data Testing Tool showed no errors. Now I just have to figure out how to remove the hentry class. You’ve already helped me out a ton, but a quick question. Is there a simple way to remove the hentry class and leaving the rest of the widget the same? Or would doing that require that I remove code like ect?

    • Hi Rana,

      You can remove classes using jQuery removeClass, however this is more for styling with css, and doesn’t work for removing hentry class for Google crawling.

      Different “recent posts” and “popular posts” plugins use different markup, so some don’t have the “hentry” class

  20. Hi Sir, my site is and i suddenly had issues in webmasters tool. followed the steps and resolved. but even after 1 week am not getting my original traffic. i want to get my previous keywords which were ranking in 1 st page of google..plz help me..what i need to do after resolving the hatom errors…

    • Hi Veena,

      It’s not likely that the hAtom errors would lead to a drop in traffic. You would need to check your keyword rankings, and compare with your competitors to see why your rankings have dropped.
      SEO work is ongoing, the keyword phrases that people search for change in popularity, so regular posting to your blog, and continuous work on promoting is ongoing.
      Be sure to keep an eye on what is happening using Google Webmaster Tools as well as Google Analytics.

  21. Hi David,
    I’m having same issue on two of my sites which are using same theme and I tried follow your steps with adding functions and with blog posts on Rich snippet test tool under Extracted structured data I see necessary information, but also all errors are still there. But if test product link there there is only errors.

    Do you have advice what I should do?

    • Hi Adrian,

      Took a quick look at, I see you have successfully implemented the hAtom function for your blog posts. The reason you are seeing 8 sets of errors is because your “Latest collection in Fashion Drop store” widget at bottom of page includes the class “hentry” so rich snippet tool looks for hAtom data inside the hentry class.
      You would need to see if you can edit that widget, or modify the template part that is controlling the class names for it. Please see my comments for @Damien Zander above that talks about widget issues.
      As for your product pages, I guess you could try to use Woocommerce conditional tags – – and target these product pages also in the hAtom function

      • Hi,

        Sorry for double posting before. Thank you for pointing out what is causing issue, unfortunately I’m not a developer so I don’t know how to crate those things you mention. My knowledge in coding is – open that and paste it there. :)

        Is there simple way to fix those things or I should hire developer?

        • Hi Adrian,

          I haven’t tested with Woocommerce Conditional Tags, however you could try modifying the hAtom function, change:

          if (is_single()) {


          if (is_single() || is_product()) {

          • Just did some tests and my sidebar is fine it is not causing any issues, those errors are from short-coded products I have in the end of the each blog post.

            So my only issue is woocommerce errors.

          • Hi Adrian,

            Yes the errors due to the widget at bottom of page.
            Could check with Woocommerce see what hooks are used, but perhaps you could try adding another function just for product pages, to add the hAtom data onto single product pages. Again I haven’t worked specifically with WooCommerce to know how the templates are exactly setup, but looking quickly over at the WooCommerce site something like the following might work:

            //add hatom data to single product description
            function add_mod_hatom_products($content) {
            $t = get_the_modified_time('F jS, Y');
            $author = get_the_author();
            $title = get_the_title();
            if(is_product()) {
            $content .= '<div class="hatom-extra"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
            return $content;
            add_filter('woocommerce_single_product_summary', 'add_mod_hatom_products');

            I haven’t tested this code above, you may want to verify with a WooCommerce forum if it will work for your site

  22. Hi, David. I tried your solution above and it worked for me partly. Can you please tell me what needs to be adjusted? After adding those functions and testing in Google Rich Snippets Tool I do get all data there, but I see also errors there. Plus I have store with products and if I test products there is only errors.

      • So your method partly worked, but couldn’t solve it completely so I decided to change the theme. Theme update helped a lot, but I still get one error line on all products “Error: Incomplete microdata with” and two error lines on blog post “Error: Missing required field “updated”.
        Error: Missing required hCard “author”.”

        Can you please help me with that?

        • Hi Adrian, glad you are finding some progress, I’ll try help further if can, what pages are you having this error on?

    • Hi Adeel.

      Thanks for your comment, I haven’t had experience using Blogger based websites, if you have access to the html of your website’s template, then you could perhaps edit the post template and add in the “updated” field and “author” fields manually to the template.
      Perhaps ask what can be done over on a Blogger G+ page:

  23. hmmmm – I’m using genesis and a child theme. I added it to the functions.php and I still get the Updated missing error. Any suggestions?

    • Hi Trista,

      Just took a look over on your blog pages and I see that you’ve got the hAtom markup working on your blog posts, looks good

  24. I appreciated your article and even though it did not resolve my issue it gave me a bit more courage when delving into the source code. It appears that my marketplace plug-in is adding an additional calling for hentry that is not being fulfilled. Any thoughts on this or suggestions as to how I might begin to rectify the issue? Are you for hire for such a thing if I can’t? Thank you in advance. Best Regards

    • Hi Christopher,

      Great that you are trying to work out what is going on. If a particular plugin is using the post class that calls “hentry”, then you could try removing the class. If you look at the comments above regarding “recent posts” plugins, it might give you some ideas. Alternatively, depending on what pages “hentry” needs to be removed from, and what else is on those pages, you could try a conditional tag to target the specific page, then use a function to remove “hentry” from the post class. For eg, if targeting front page:

      function remove_post_class_frontpage_posts($classes) {
      if (is_front_page()) {
      $classes = array_diff($classes, array('hentry'));
      return $classes;
      } }

      Just be aware that this removes hentry from all posts on the targeted page.

      • David,
        thank you kindly for the advice. It appears to me that the market plug-in is calling for the hentry fields, when in fact they have already been filled in the main structure of the site. If I knew where it was located I would pull the entry code out of the plug in (although i’m sure it’s supposed to list product varients). since this plug-in does not have a ‘single.php’ file or similar. would you have advice on where to look for the hentry code? At present I can only locate the hentry and the schema in the main wp core files. Thank you again for your guidance.

        best Regards

        • Hi Christopher,

          had a quick look at your site code, I think you are using MarketPress?, if so I haven’t used before but I see that on your home page, the sidebar widget that lists some products has the hentry class added because the product’s classes are being echoed. Look for the following code in your plugin’s main file:

          <ul id="mp_product_list">
          then just below that should be the something like:

          echo '<li 'product_class('product', $post->ID).'>';
          You could try changing the line to:

          echo '<li class="product">';

          Be sure to have your site backups up to date, before editing any code, and also make sure you have a copy of the file you are editing, as a backup if you make a mistake. I haven’t tested this, however if you are unsure, you could query the change with the plugin’s developer before implementing.

          Also note that when you edit a plugin’s files, your changes will be overridden when you update your plugin next time.

          • Hello David, A huge thank you to you!!! I could not locate the code, however knowing where the problem stemmed from helped an enormous amount as I simply removed the widget and wrote my own text code to complete the same task. You have truly summed up in a few days what has been a thorn in my side for months. Thank you again!

  25. hi i put this function in my function.php but site running fine but when i tr to open my admin panel i got following error
    Warning: Cannot modify header information – headers already sent by (output started at /home/mp3kota/public_html/wp-content/themes/noteworthy/functions.php:1) in /home/mp3kota/public_html/wp-includes/pluggable.php on line 896

    please tell me how i solve this issue i not professional so please tell me step by step.

  26. hi i put this function in my function.php but site running fine but when i tr to open my admin panel i got following error Warning: Cannot modify header information – headers already sent by (output started at /home/mp3kota/public_html/wp-content/themes/noteworthy/functions.php:1) in /home/mp3kota/public_html/wp-includes/pluggable.php on line 896 please tell me how i solve this issue i not professional so please tell me step by step.

  27. Hi, Should the Google Structured Data Testing Tool update the information straight away. If it does then the above did not work.

    I entered the Henty code as below. Should it go there or somewhere else? You just mention to put it in post class for your single.php template.

    <div id=”post-“>

    <a href="” rel=”bookmark” title=””>

    I also added your code in the functions.php but again where do you add it. I added it between some parts that i thought were closed functions.

    #headimg h1, #headimg #desc {
    display: none;
    #headimg h1 a, #headimg #desc {

    //mod content
    function hatom_mod_post_content ($content) {
    if ( in_the_loop() && !is_page() ) {
    $content = ”.$content.”;
    return $content;
    add_filter( ‘the_content’, ‘hatom_mod_post_content’);

    //add hatom data
    function add_mod_hatom_data($content) {
    $t = get_the_modified_time(‘F jS, Y’);
    $author = get_the_author();
    $title = get_the_title();
    if(is_single()) {
    $content .= ”.$title.’ was last modified: ‘.$t.’ by ‘.$author.”;
    return $content;
    add_filter(‘the_content’, ‘add_mod_hatom_data’);

    Please help as I do not understand code language and just adding code is not what i have done before. I have read other pages and they just say pretty much the same thing but I do not know where to put it.


    • Hi Steve,

      The “hentry” class will most likely be already on your single post pages, as it is a default WordPress post class that is added. The function needs to be added to your childtheme’s functions.php file. If you are not running a childtheme, then you could add it to the theme’s functions.php file, perhaps just before the closing php tag.

      The code above you have pasted contains css, suggesting it is a css file, not the functions file, might want to double check.

      Google will possibly cache results for a short time, perhaps give it a couple of minutes before retesting, or alternatively test another page on the site. Also, if you are using a cache plugin, for eg W3TC, then you will need to clear all caches before testing. Also if you are using a CDN, for eg CloudFlare, Amazon S3, etc, then you need to be sure that the file is updated on the CDN.

  28. Hi, You state above that I must check the Source code but in which file? I have all of these files (as below) and do not know which ones you are talking about.

    Please assist as I do not understand code, so this is like reading Chinese to me.
    Please advise which .PHP files I need to change and where I need to add it. Do I just add it to the bottom of the .PHP file or does it have to go between two bits of code?

    04 Template
    Archives Page Template
    Theme Functions
    Main Index Template
    Links Page Template
    Page Template
    Search Results
    Single Post


    • Hi Steve,

      you can add functions into the functions.php file, and on the lines before the closing php tag, which is a:


  29. Hi, I had several errors and when I enter “date updated” in my functions.php it fixed the post errors but not the static pages. Do you know what I need to do to fix static pages also? Thanks.

  30. Hi David,
    I still do not know what I am doing wrong>

    I opened up WordPress – Appearence – Editor. I then opened up the functions.php file .

    I ‘CTRL F’ for the word Hentry but it was no there. When I do a snippet test all of the red errors occur as mentioned in your post. If Hentry is not there then why is the error occurring?

    I also tried adding the code under – How to modify the source code to fix hAtom errors? in the single.php but i still get the errors.

    Please help!!


    • Hi Steve,

      No problems will try explain further for you.

      The 2 function codes in the article, namely “function hatom_mod_post_content” and “function add_mod_hatom_data” should be only added into the functions.php file. The css code in the article only goes in the css stylesheet file, which is normally style.css.

      After doing this, check a blog post page with the Google Rich Snippet Tool to see if it clears your hAtom error.

      If you want to try adding hAtom markup to the home page of your website, or other non post pages, then you will need to add further WordPress conditional tags, see some of the earlier comments for some ideas, or have a look at the WordPress codex Each theme is different and how you set up the home page can be static pages or default blog page, so this does affect the conditional tags. Trial and error usually can help here, with some patience.

    • Hi Obat,
      sometimes reading more articles on other websites, about the techniques can help you to further understand. It really depends on how much you want to try to learn about doing some of the more technical stuff on websites, and then it’s trial and error

  31. Hai David, nice post. I have same problem with my site. I’m develope my site with CI and using wordpress template, and maybe is not complete template. But now is fix. Thanks very much, please come to my site :)

  32. Well, this post is very helpfull but… What if I have Landing Page. WordPress theme with static hompage and error is “Error: At least one field must be set for HatomFeed.” and only this. I’ve searched google and didnt find the solution for this, a lot of fixes for posts, but for static hompage (builded with pages not posts) – there is not ;-( Maaybe you David would like to help?

    • Hi Bartek,
      have you tried targeting the static front page using is_front_page() in a function to remove the hentry class? If it’s a landing page, it doesn’t really need to have author and modified date markup, so perhaps eliminate the error by removing hentry class from the article/post class of the page

  33. Please help Urgently.

    I put int the codes in the functions.php and now my website will not even load and i get the below error

    Parse error: syntax error, unexpected $end in /home/content/p/a/t/pattayahotel/html/Magic Green Coffee Beans OZ/wp-content/themes/black-skyline/functions.php on line 237.

    Below is my Functions.php file

    (code removed by author)

    Please help as it has totally stuffed up my site.


    • Hi Steve,

      If you have modified your functions file and it is causing an error, then revert to the file before your changes to get your site back online.

      I’ve removed the paste of code that you put in your commment, as it is both too long to put in a comment, and also does should be reformatted before entering into comments as per

      From what I could tell looking at your pasted code, although it was full of crazy characters, looks like you have css pasted in your functions.php file??, and also I couldn’t see correct open and closing php tags?

  34. Hi sir,
    I want to buy your video,
    But I want to pay with payPal ?
    So how can i fix that ? please


    • Hi Ashraf,

      Thanks for your enquiry. PayPal is now enabled as a payment option for the video tutorial

  35. Hi there David! What a great post! I use the Headway themes, and I’m having great difficulty resolving these errors. Headway doesn’t use a child theme (I don’t think?), the Headway Base: Theme Functions functions.php file I can find says something about “please do not access this file directly”, and I don’t want to screw up my site. Before I buy your video (which is a great deal, by the way!) can you take a look at my site and tell me if I am able to make the required changes? I do find this tutorial, which sounds like it might work, but maybe overkill?

    I really have no idea what I’m doing, so any help will be greatly appreciated.

    • Hi Greg,

      Thanks for the feedback.
      Haven’t used Headway themes before, but it seems that you can setup a childtheme if you want, otherwise an alternative could be to use the mu-plugin alternative for adding custom functions to your website. This is covered in the video, so maybe might give you the information you’re looking for.
      I looked over at your website, looks good, I see that the hAtom errors are popping up on the blog post pages, so the function should help you sort that out.

  36. Hi. My website is having this errors too, I put the codes into the function.php and I can fix the single post. But actually, the whole page still have this errors. Please help me? Thanks !

    • Hi Tien,

      You may need to check if any sidebar or footer widgets are using the hentry class, if you are still getting errors on your single post pages.

  37. Hi david, I ask for the “hentry” class in category ang home page. I have fixed the errors in post but not the categories and the home page. What can I change to fix this. Many thanks !

    • Hi Tien,

      You possibly need to look at the source code on your home page, category pages or other pages, to see how your theme is using the hentry class. As suggested in the post, there are certain requirements for hAtom markup. You can use WordPress conditional tags to target other pages. For home page, you would use is_front_page(), and for category pages, you could try is_archive().

      Have a read through some of the comments above, there is a lot of information provided on this. Otherwise in the video tutorial, I go through how you can remove the “hentry” class from certain pages to remove the error.

    • Hi Akhil, the code is for WordPress websites. However the hAtom information that Google requires is related to all websites using “hentry”

  38. Ok. Thank you.
    I found the erorrs came from the template file. But actually I couldn’t fix it cause I didn’t good at coding any more. Could you please look through my template php file and give me an advice ? May I have your email?

    • Hi Tien,

      The video tutorial goes indepth on how to add the functions to your WordPress website, and also shows how to remove hentry from pages that you don’t want hatom markup on. However you are also welcome to email me using my contact page. There is information about my rates here

  39. Hi David,

    I am currently using DIVI theme, so I pasted the code into my theme custom css. Looks like it didn’t help.. May I know where do you paste the code under the functions.php?

    Thank you so much for this article and your efforts.

    • Hi Vic,

      It is best if you setup a childtheme, the Divi theme from Elegant Themes supports childthemes, and this way you can add your css styling to the style.css, and add the function code to your functions.php file.

  40. So, is there any way to do this on a free site? It doesn’t appear there is any way to edit your template there, and it seems none of the templates support it. Google’s markup tool doesn’t do it either, it ignores these tags, which is somewhat ironic.

  41. Ciao, su Strumento di test per i dati strutturati riscontro questo errore : hatom-feed
    hatom-entry: Errore: Missing required field “updated”. Ho letto con molta attenzione il tuo articolo ma purtroppo ho controllato per ore tutti i file del tema e non riesco a trovare niente che possa essere modificato…non c’è la voce THE TIME…ne UPDATED…ne Altro in nessun file!!! Quindi volevo chiederti di aiutarmi se è possibile!! Sarei interessata anche ad inserire una stringa alla fine di ogni post per eliminare questo errore qual’è questo codice da inserire? Sarei grata se mi potessi aiutare , grazie!

    • Hi Roberta,

      thanks for your comment, I used Google to translate so hopefully I understand better. Looks like you have fixed the code on individual blog pages, to add to the category pages, you could try adding the hAtom function to “the_excerpt” by targeting the is_archive() conditional WordPress tag.
      This may or may not work depending on the page template that your category pages are using, and whether they are displaying excerpts or content.

  42. Thank you for posting this. Finally after searching and searching I was able to get the blog portion of my site working without any errors in snippet tools. What are your thoughts on doing this for a static homepage of a business website? Should the homepage even show an author to begin with?

    • Hi Brandon,

      thanks for feedback. HAtom structured data is mainly for blog posts, as per the information in the article from, however some people want to correct the errors on other pages too. If a website has multiple authors then it doesn’t make sense to have one author for the home page. If it is a website that has just one author for all articles on the posts and pages, then you could consider it however. Another option is to remove the hEntry class from pages that you don’t want the hAtom markup on.

  43. Added code to functions.php and still getting the following errors. Any help is appreciated.

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

  44. Hope you don’t mind me posting this. If you do please remove. If you want to remove errors on Google for WordPress pages you can add the following to functions.php.

    function themeslug_remove_hentry( $classes ) {
    if ( is_page() ) {
    $classes = array_diff( $classes, array( ‘hentry’ ) );
    return $classes;
    add_filter( ‘post_class’,’themeslug_remove_hentry’ );

    • Hi Tom,

      I see that you’ve removed hEntry class to remove the errors. This is definitely an alternative way to remove the hAtom errors. I discuss this method in the tutorial video as a way to remove the errors from your home page by targeting is_front_page().

      Removing hEntry class, will work as long as your theme doesn’t include hfeed class, which will still cause Google to look for hAtom markup. Also some themes css styling uses hEntry class, so always check your pages look the same.

  45. Hello, Is it important to use the hatom-entry on the front page ?…My blog is one author blog. I used the

    if (is_home() || is_single() || is_archive() ) {

    but it didnt work. I again used the

    if (is_front_page()

    didn’t work either. Any way to guide me ?

        • Hi Mick,

          In that case, your home page template has the hEntry class, but mustn’t be using “the_content” hook, so probably doesn’t have the required entry-title or entry-content either. So you could try removing the hEntry class altogether from your home page. The video tutorial shows this procedure, or the plugin uses this technique also, otherwise Tom has mentioned the function also in his comment above.

  46. Hai David,
    I read some comments above and you can help almost of them. I hope you can help me too for my problem. :)
    I use catch kathmandu theme, and I have problem in webmaster-Structured Data > hatom (markup: My problem is :

    error ~> missing : author (in page & post)
    error ~> missing : updated ( in page & post )
    error ~> missing : entry – title (in home)

    help would be great thanks.
    and, I am sorry, my English is not good. I hope you can understand every words from me. :)

    • Hi Reswara,

      I see a couple of issues with your hAtom markup. Firstly on the home page, I see that you are using a featured post widget to display 3 feature boxes, each one of these has the hEntry class, so you either need to try removing the hEntry class from there, or add the required missing fields. If this is a theme set home page that you are displaying, perhaps check your home page template. If this is a plugin, then you would need to refer to the plugin files.

      Second I see that you have added the hAtom function to your blog posts, which looks good.

      Finally, I noticed on your website pages, that the actual hAtom function code is appearing in text on the bottom of your pages?? You need to review where you are adding this function code. It should be entered into a functions.php file (or mu-plugin file), not added into a page template, if that is what you have done.

      Hope this helps you get started in fixing some more of those errors

      kind regards, David

  47. Hai david,
    I have visit your site many times after I leave a comment to your posting. I am waiting for an answer from you. I hope you reply my question, its no problem if you can’t answer my problem.
    thank you very much before. :)

    • Hai David,
      first of all, I say thank you very much, because you respond my question.
      for the first case, about I am using a featured post widget to display 3 feature boxes, how to removing the hEntry class from there? or, how to add required missing fields? you are right, I am using widget.

      Seconds, yes I do, and that work. Thank you.

      Oh, thank you, you remind me about that, I dont know where I must to put that code, I have put the code on function.php file. but still not work.

      • Hi Reswara

        To fix your home page widgets, please have a read through the comments above for Damien Zander which might give you more of an idea.
        For your pages, if you want to target them like you do for your posts, then you can edit the hatom function line:

        if(is_single()) {

        if(is_single() || is_page()) {

  48. Hi David,

    I have tried inserting the code into various php files in my functions.php (child) but the code doesn’t seem to be creating the expected results when I view the source. I know that my theme uses a post-formats plugin. Could that be overwriting the changes that I’m trying to make in my functions.php file?

    • Hi Jon,

      Took a quick look at your site, and I don’t see the hEntry class on your website home page or blog post pages. Without the hEntry class, the pages won’t register as having hAtom markup.

      If you want to include hAtom markup, then you need to add the hEntry class into your theme template. It’s not essential, the main reason people are adding in the functions above are to correct errors that are already displaying with their websites.

  49. Hello David,

    I have tried your code and also bought your Plugin, but am having the same issue with both.

    I want to take the “modified last by” comments off every single page as it is coming up in super ugly spots, but the code to take it away when put in the functions file just dumps the site so it is completely unreachable until taken out. The other code works great so am now using that instead of the plugin.

    Any help would be much appreciated.


    • Hi Johnathon,

      Thank you for your purchases. I have taken a look over at your website, I have some suggestions. Firstly the widget that you are using for your testimonials is adding a hEntry class for each testimonial that scrolls through. Now this causes many repeated errors on all your pages that display the testimonial. I would check with your plugin provider if there is an easy way to remove hEntry class from this. Otherwise these errors will always persist. If you refer to my comments with Damien Zander above, then you will get an idea.

      Secondly I cannot see the function or plugin on your website at the moment, so cannot advise on what is happening. However if you are wanting to hide the line then you use:

      .dtherpt {display:none !important} for the plugin or,

      .hatom-extra {display: none !important;} for the hatom function in the article.

      ***important note: this is css code, so you must enter it into your stylesheet.css file, or a custom css section in your theme if available. It cannot go into a functions.php file.

      kind regards, David

  50. Thanks David a ton for the advice!

    It works out that, the testimonial plugin I am using has a simple button to turn off the hatom so hopefully that should have now fixed that issue??

    I am having a mare with getting rid of these unwanted comments at the bottom of every page and post. I am working on the style css as you recommended and have tried first trying to make it work with the code through the function and then through the plugin, but I just cannot get rid of the comments and I know I am doing something wrong, but don’t know what.

    I also know I must have something else wrong still because even when the plugin or code is working well and the plugin has been fixed, there appears to still be errors coming through google.

    Thanks so much for everything you do!


      • Thanks David!!!!!

        You are simply brilliant. You took a lot of time out of your own day just to give me a helping hand and it says a heck of a lot about your character!

        Thanks a lot for all your help.


    • Hi Cuong, you could try using some css to hide the content you don’t want to display. The css code “display:none;” is used to hide elements on pages

  51. Hello, I have a problem with hAtom microformats. I have added your code, which just resolved a problems with posts and static pages, but I have still a lot of errors at Google Webmaster Tools. It shows that I need to add author, entry-title, updated to CATEGORIES and TAGS and also for ” / ” page (homepage?) – like “/category/apps/” or “/tag/yahooanswers/”.

    Can you tell me please what I can do with it? I would buy your plugin but I’m not sure if it work.

    • Hi Vex,

      You can use other WordPress conditional tags to target other page types on your blog, for example is_front_page(). There is more information about conditional tags at

      There is some information on the plugin page at that talks about what the plugin does to help on archive pages and home pages.

      It cannot correct errors that are being generated in sidebar or footer widgets, and it relies on the use of the_excerpt in archive pages. To correct errors on home page of your blog it removes hEntry class if present in body of page, however hFeed class can also generate hAtom errors depending on your theme.

  52. hi .. i am using blogspot .. now in trouble with hcard error ..
    trying many thing nothing happened :( if any kind here please help me
    check my blog and see where is the actual problem .. actually i am newbie at all .. dont know how to fix please please help me anyone

    • Hi Obat Botak,

      thanks for your interest, have you added the code into your functions.php file and did it help at all?

  53. Hi
    there are
    Missing: author
    Missing: updated
    on 248 pages of my blogger blog as shown in webmaster. in your post u show how to remove these for .php. but i want to how to do this with blogger.

    well thanks in advance….

  54. Hi,

    I was able to fix all the errors on posts / pages but I continue to get this errors on Tags & Categories. How do we fix it? your response would be greatly appreciated.

    – Site Admin

    • Hi there,

      your comment was caught up in the spam filter, but I see you have already solved your issue on category page which is great

  55. Hi David, I’m having this issue on – I’m using the westen template and added the code you suggested to the functions file, but it made no difference at all in the rich snippets tool. I also followed a guide from here and found the code they suggested changing in several files, but still no change. Could you shed any light on this for me? Thanks a lot for your help,


    • Hi Jake

      Just took a look at your site, seems the code is not appearing on the page at all. Have you added it to the functions.php file of your active theme? When you add the code check in the source code of your posts page and see if the hatom extra code is added to your page at all.

  56. Hi David,
    I’m using a site (Forever theme) and can therefore only edit the CSS. I input your code but am still getting the Missing: Updated error in webmaster tools structured data. I’m kind of a coding newbie, so any advice would be greatly appreciated!

    • Hi Lolly,

      you have some restrictions with sites, please see more information in the comments above with Robert, where I made some suggestions

  57. David In wordpress classipress them single php i only found entry title code and i edit it but in webmaster structured data entry title error not solve. I not found author code and updated code in single php. my site address is so plz guide me last 3 months i search on google and try every code and plug in but problem not solve.

    • Hi Khan,

      I took a quick look at your site to see a single post, and I note that you don’t have hentry class or hfeed class on the page, so your posts shouldn’t be generating hAtom errors.
      I see using the Google Rich Snippet Tool that you have hcard error. As you have the fields “author vcard” and class=”fn” for your author field, then Google is looking for either hAtom markup or hCard markup. As you don’t have hentry or hfeed classes on your page (required for hAtom), it looks for the hCard fields –

  58. dear sir i am using ipin pro theme and getting errors
    Missing: author
    Missing: updated.

    i am unable to find the date and author in my files. can you please help me to find these and resolve the problem.

    • Hi Sunil

      If you are unable to follow the tutorial above, then you may find using either the plugin or the video tutorial helps. If you have added the code above into the functions.php file of your theme, let me know and I will view your site to see if I can offer any further suggestions

    • Hi Finnie

      The code for the functions goes into either your childtheme’s functions.php file or otherwise in an mu-plugin file

  59. Hi David,

    To fix these damned errors, I inserted the code you gave in the function.php of my theme (Viewport) at the end of the last line. But the code appeared at the very beginning of the pages of post and categories (not on the home page). I had to retrieve it, and yet it still appears in one of the category:

    Any idea of what is wrong and how to fix the display of the code?

    Thanks in advance,


    • Hi Alain,

      The code goes into the functions.php file inside php tags, so it can go at the end of the file, but before the closing php tag “?>”

      I could not see it on your website, but if you do add the code again let me know and I will take a look.

      • Hi David,

        Many thanks for your kind answer.

        I inserted the code before the “?>” tag (didn’t know I had to do like this..) and no problem of code displaying on the post page or category page occured.

        But alas, I always have the two errors:

        Erreur : Missing required field “updated”.
        Erreur : Missing required hCard “author”.

        Would you be so kind as to have a look ?

        Thanks in advance for your time.


  60. Hi David,

    Sorry, I was checking the home page, this is why I still saw the errors. Now everything is ok for posts (and pages, too).

    Many thanks for your kind and brilliant help on this matter because I spent weeks browsing the Internet seeking a solution as I was kinda afraid to modify the codes. Now God-gle’s wrath should be soothed and “It” won’t frown anymore on my site! (I’m trying to get my magazine indexed in God-gle News..)


Comments are closed.