How to Fix – hfeed Warning: At least one field must be set for HatomEntry

Home   >   How To Guides   >   How to Fix – hfeed Warning: At least one field must be set for HatomEntry

When using the Google Rich Snippet Tool a warning of hatom-feed shows up in Extracted structured data section if the tool is unable to extract the information “entery-title”, “updated” and “author” from the webpage you are testing.

If the tool is unable to extract information of all three fields from webpage it shows following warnings;

  • 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”.
Hatom-Feed Warning
If Google Rich Snippet Tool is able to extract information from one or two fields it shows warning for only missing fields.
 

Solution:

You need to provide rich snippet tool these three fields to remove these warnings. WordPress users need to modify single.php in their theme folder to remove this warning.

Fixing Warning: Missing required field “entry-title”:

The title of your post which is mostly enclosed in header tags needs to include a class attribute. If it already has a class attribute then append “entry-title” without quotes to it.

1
<h1 class="entry-title">Page Title</h1>

For WordPress users:

Open single.php located in your theme folder and find. If it is not enclosed in header tag then wrap it into a header tag and add class attribute with value “entry-title”.

1
<h1 class="entry-title"><?php the_title(); ?></h1>

Fixing Warning: Missing required field “updated”:

To remove this warning you need to have a date of content update. The date needs to be closed in a span tag with attribute.

1
<span class="date updated">Date</span>

For WordPress users:

In your single.php file find the_time or echo get_the_date(); and enclose it into a span tag with attribute.

1
<span class="date updated"><?php echo get_the_date();?></span>

Or

1
<span class="date updated"><?php the_time(); ?></span>

Fixing Warning: Missing required hCard “author”:

To fix the missing hCard “author” warning add enclose the author name into following span tags.

1
<span class="vcard author">
2
 <span class="fn">Author Name</span>
3
</span>

For WordPress users:

In single.php find the_author(); or the_author_posts_link(); and replace it with anyone of following lines.

1
<span class="vcard author">
2
 <span class="fn"><?php the_author(); ?></span>
3
</span>

Or

1
<span class="vcard author">
2
 <span class="fn"><?php the_author_posts_link(); ?></span>
3
</span>

Hatom-Feed Warning Fixed

Hatom-Feed Warning Fixed

If the problem persist or you have any question please post them into comments.

Posted on November 17, 2012 |   

Comments

  1. Saurabh

    Thanks. I am getting the same error for my Authorship. I replaced "post-title" with "entry title" but can it affect my theme ? As i replaced theme's class post title ?

    1. Kaleem Sajid

      Well it depends on

      post-title
      class of your theme. I recommend you to use
      class="post-title entry-title"
      instead.

  2. Brett

    Any thoughts on how to fix this problem with the WP genesis framework since it does not have a single.php and instead is based on hooks http://my.studiopress.com/docs/hook-reference/

    1. Trish

      Hi...I see no one answered your question...I came across this post looking for the same answer as yourself...I also use Genesis...I should have stayed with thesis - never had half the problems I have had with Genesis. I would like to know the answer to this as well.

      1. Darrel

        Any idea how to fix these errors using thesis theme

  3. Joko

    Thanks.. now I can solve the problem in my blog.. finally hCard Author error is fixed.

  4. Mariusz

    Hi There. Great and clean guide. I do not know why but everything works ok while testing mariuszrymanowski.pl/blog but when checking home page errors still appeaser. Its 2nd month of waiting for Image in Search results :(

  5. Himanshu

    Found these errors and implemented your way, but failed to clean the errors. Please help me.

  6. Kashyap Shreepathi

    Thanks a lot! Worked perfectly. Google authorship is working fine now...

  7. Ed Lamb

    Hi, Thanks for posting this! Unfortunately, it's online fixing 2 out of 3 issues - I'm still seeing an error for the 'entry-title' which is frustrating. Think it may be a WP theme issue but developer is out of ideas. Site URL I'm working on is http://rmpproperty.com/ if anyone has any ideas! Thanks again, Ed

  8. Chris

    Thanks for this! I have been able to fix 2/3 of them but I cannot seem to get the 'Header Tag' created for the entry-title one.

  9. Chris

    DOH! I found it scratch that....early morning! Thanks for this post!

  10. Walter Pinem

    how to fix the errors on swift basic wordpress theme? The codes of author and date updated aren't in the list. How should I do to fix them? Thanks before

    1. Jennifer

      Hi Walter, Did you find an answer to your question re: the Swift Basic theme? I have the same issue and none of the other solutions seem to work. Regards

  11. Chris

    I have done this and the data shows up in the snippet preview. Thanks.

  12. Karina

    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.

  13. budi setiawan

    what about blogspot?

  14. Nigel

    Hi, What happens if you do not have a single.php file to edit? We use the Genesis and child theme magazine but nothing to edit in the child theme and when going to parent theme genesis, the single.php has nothing to edit and says don't add anything here or it will break :(

  15. hairdresser in galway

    Hi Thanks for useful info. Do you know if this will work with directory themes? Thanks

  16. Mark de Scande

    @Kaleem Sajid thank you it help me out on my website. Now the only problem i have is Automatically detected author name on webpage: Not Found. If you have any ideas let me know Thx Mark

  17. Rohit Agarwal

    Thanks for giving me the perfect solution.

  18. Peter

    Hello Kaleem, I do not have a single.php in my child theme (Lifestyle) but there is one in my parent theme (Genesis). However, it is blank (see below). How do I create a single.php file and should it be in the parent or the child folder?

    <?php
    /*
     WARNING: This file is part of the core Genesis framework. DO NOT edit
     this file under any circumstances. Please do all modifications
     in the form of a child theme.
     */
    
    /**
     * This file handles posts, but only exists for the sake of
     * child theme forward compatibility.
     *
     * This file is a core Genesis file and should not be edited.
     *
     * @category Genesis
     * @package  Templates
     * @author   StudioPress
     * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
     * @link     http://www.studiopress.com/themes/genesis
     */
    
    genesis();
    

    1. RunFasterWithMe

      I am having the same exact problem have you found a fix for this?

  19. AJ Marek

    Excellent! Kudos to your solution. BTW for all above, different theme vendors use code sets in files other than single.php and may break up the tag code ... so do a search on the site files for "title" and "date" to find the specific files used by a vendor, and modify those files/snippets accordingly.

  20. Radu Dragan

    It works really well, thanks very much.

  21. Keith Lee

    Can you have a look at my site please. Cant figure what to to do to correct Error: Missing required field "updated". Error: Missing required hCard "author".

  22. Oisin Conolly

    excellent, thanks a lot for this. I'm all valid now :)

  23. Arun Kumar

    Thanks, This is a nice article, was of help for me.

  24. Prateek Mondal

    Thank you very much. I have just solved the required missing problems with your suggestion. It is working nice with my website theme. Thanks for your help. If you have any suggestion regarding my website I will be grateful to you.

  25. Magda

    I'm using Custumizr theme, and can't find single.php, where should I check the codes for fixing this problem? Thank u

  26. Oishi recipes

    Hi, Thank you very much for this information. It worked for me. I was getting error for updated and name.

  27. Boby Kurniawan

    I've tried a lot of tutorials, but no one can help me until I found this one. Thank you very much.

  28. Obat Herbal

    wow.. its work. good tutorial... thanks brother..

  29. Andrew

    Thanks for your info! Very useful!

  30. surabhi

    I tried the options given by you above. I still am getting those errors. Pls guide

  31. Friendship SMS

    Works like charm !! :) Thnx for providing this information ! :D

  32. Beatriz López

    Hi I have this problema in the web pages and the posts work fine. Any idea where I have to update above code? best regards, Bea

Leave a Reply

HTML is escaped automatically. Surround code blocks with <pre></pre> for readability.
* Your email address will not be published. Fields mark with (*) are required.