Fix the Errors
hatom-feed hatom-entry Error – WordPress Solution
Using rich snippet tool from Google i have noticed that i have some things missing there.
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”.
So i have solved them (at least on my single posts for now) and i want to share it with WordPress users.
Lets take them one by one..
Error: Missing required field “entry-title”
The simple solution for this is located in single.php
<h1 class="entry-title"><?php the_title(); ?></h1>
search for the_title and enclose it into a span tag like above.
In my case as i am using a framework and theme from Themify the things had to be a bit different.
So the solution in my case was in loop.php
i found this inside :
<h1 class="post-title"><?php the_title(); ?></h1>
so it had class already.. hmm, i just added the class together with the existing one.
<h1 class="post-title entry-title"><?php the_title(); ?></h1>
and it worked and solved my problem.
I bet that this will help you understand how to fix it for any other framework and theme
Error: Missing required field “updated”
Simple solution again would be located in single.php
<span class="date updated"><?php the_time(); ?></span>
Again we search our file for the_time and put it in tags like above.
In my case i searched the loop.php once again and i found this :
<time datetime="<?php the_time('o-m-d') ?>" class="post-date" pubdate><?php the_time(apply_filters('themify_loop_date', 'M j, Y')) ?></time>
All i had to do is add an extra class date updated to the existing span and i got this :
<time datetime="<?php the_time('o-m-d') ?>" class="post-date date updated" pubdate><?php the_time(apply_filters('themify_loop_date', 'M j, Y')) ?></time>
Error: Missing required hCard “author”
In single.php we have to find the_author or in some cases the_author_posts_link and parse it like this:
<span class="vcard author"> <span class="fn"><?php the_author_posts_link(); ?></span> </span>
In my case once again was different but i think you get the idea.
I hope that my experience with this will help you solve your own errors.
hatom-feed hatom-entry Error – problem solved
I speak English, Greek and Serbian but i can communicate in many Slavic languages as well.
As a freelancer i offer my services for 10$ per hour.
I can deal with almost anything web design & development related. Feel free to request a free quote using the form below.
Latest posts by Nikola Petrovic (see all)
- The Best SEO Extensions For Google Chrome Browser - 30. March 2014.
- Contact form 7 in popup window – WordPress Tutorial - 28. March 2014.
- Protected: pleasure hobby report - 21. March 2014.