Contact Us Want to contact us, Press the button to send us mail. About us

Fix Google Rich Snippets Errors : Warning: Missing required field in WordPress

Rich Snippet is a additional feature in Google search that show additional info about page listed in search, specially Author, Date, Ratings etc. Rich snippets are displayed reading microformats or RDFa in the web pages. According to some sites, rich snippets can improve the SEO of the site (though I haven’t seen any change).
If you are thinking of putting rich snippets in WordPress then the chances are, you might face snippets error such as:
Warning: Missing required field “entry-title”
Warning: Missing required field “updated”
Warning: Missing required hCard “author”

fix warning missing fields google rich snippets nice_image_name

To fix these errors you need to modify single.php file, the instruction on fixing these errors along with code in given below.

Warning: Missing required field “entry-title”

This error occurs when Google snippet cannot find the title.
Replace
<h1><?php the_title(); ?></h1>
with
<h1 class="title single-title entry-title"><?php the_title(); ?></h1>
note: some themes has h2 instead of h1.

Warning: Missing required field “updated

This error occur when Google Snippet cannot find date it was published or last updated.
To solve this find,
<span class="post_date"><?php the_time('j F,Y'); ?></span>
and replace it with
<span class="post_date date updated"><?php the_time('j F,Y'); ?></span>

Warning: Missing required hCard “author”

This error occur when Google is unable to find the author of the post. This part use elements from hCard microformat which are ”vcard” and ”fn”.
To solve this,
Find : <?php the_author(); ?>,
and replace it with;
<span class=”vcard author”><span class=”fn”><?php the_author(); ?></span></span>

Editing these usually fixes all the error related to Google snippets and make your wordpress theme compatible with Rich Snippets. You check the error in rich snippet from Rich Snippets Testing Tools.
For instruction on adding rich snippets on multi-author blog, read our post How to : Google Authorship Rich snippet in Worpress Multi-Author site