63Wordpress LogoResolving Google’s Rich Snippets Testing Tool errors

Please note!

This art­icle has now been super­ceded by a new art­icle, which has been updated to use MicroData (schema.org) instead of Micro­Formats. If you still wish to use Micro­Formats read on, but I recom­mend using MicroData and invite you to read the new art­icle, which will con­tin­ue to be updated with new inform­a­tion and new themes. [int­link id=“3500” type=“post”]New info on MicroData[/intlink].

Please note

I have moved the ori­gin­al con­tents of this post to new posts as the num­ber of themes I have instruc­tions for increases. There are now spe­cif­ic instruc­tions for [int­link id=“2948” type=“post”]Mystique 2[/intlink], [int­link id=“2949” type=“post”]Mystique 3[/intlink], [int­link id=“2468” type=“post”]Thesis[/intlink], [int­link id=“3015” type=“post”]Twenty eleven[/intlink] and [int­link id=“3017” type=“post”]Me Gusta by Cosmos[/intlink]

The ori­gin­al[int­link id=“2948” type=“post”]Mystique 2 article[/intlink] is the most detailed if you are look­ing for addi­tion­al inform­a­tion. Below I have provided a gen­er­ic idea of what is required and where to start when try­ing to modi­fy a new theme

Part 1: Authorship information

You need 3 parts for this — you need each post to con­tain a link to your author page, you need your author page to have a link to your google pro­file (or google+ page) and you need your google pro­file (or google+ page) to have a link point­ing to your domain!

Deal with these in reverse order.

  1. Log in to google+ or your google pro­file and add a pub­lic (it does need to be pub­lic) link in your pro­file inform­a­tion point­ing to your web­site. For example — on my google+ pro­file I have a link to https://diymediahome.org
  2. Use the code provided by Yoast to put a link to your google+ pro­file on your author page
    • Install the Yoast SEO plu­gin or add the yoast code to functions.php
    • Go to your user inform­a­tion page (Dash­board: Users: Your Pro­file) in word­press and fill in theGoogle+ field (or Google Pro­file field if you used the yoast code) with a link to your google profile
    • Edit your theme’s author.php, find the code which dis­plays the author inform­a­tion (twit­ter account, web­site, etc.) and add an extra part in the same style to out­put the google+ link. Make sure the href has a rel="me"
  3. Add code so that the author inform­a­tion for each post links to your author pro­file page with a rel="author"
    • This is the trick­i­est bit — it may involve mul­tiple edits to mul­tiple files. Start by look­ing at single.php (which does single pages), index.php, search.php, archive.php etc. Look for the code which has a href="" to the author page and add in rel="author"

Part 2: Required hCard information (e.g. updated, entry-title etc.)

Each post needs some cor­rectly struc­tured markup con­tain­ing sum­mary inform­a­tion about it.

  1. These edits will prob­ably go in the same places as at least some of the author edits in instruc­tion 3 in part 1. Likely loc­a­tions are single.php, page.php, index.php, search.php, archive.php
  2. In many cases it is simply a case of adding some rel="" entries to the exist­ing code — e.g. if your theme already shows an updated or pos­ted line inside a p or inside a span you can add rel="updated" to that p or span
  3. You also need to add some more author related code — again, assum­ing you have the author name shown at the top of each post it is easy to add it there
    • you need your name inside a tag with a rel="fn".
    • This tag needs to be inside a par­ent tag with a rel="vcard"
  4. All of these extra tags need to be inside a par­ent ele­ment (maybe even the body tag) which has a rel="hentry". Most themes already have this code present

Note: Using rel="updated" on the date the post was pub­lished works, but strictly speak­ing isn’t always cor­rect. If you have actu­ally updated a post then the updated and pub­lished dates will be dif­fer­ent. Google will recog­nise both (as will humans if you show it) so it is bet­ter to add a bit of code that checks if the post has been updated. To get the pub­lished date use the func­tion get_the_date() and to get the updated date use the func­tion get_the_modified_date()If it has been updated then dis­play both the pub­lished date (with rel="published") and the updated date (with rel="updated").  If the post has­n’t been updated then just put the pub­lished date with rel="updated published"An example of code which does this is included with the [int­link id=“2468” type=“post”]Thesis theme modifications[/intlink] article.

Leave a Reply

63 Comments

DDhev

Thanks for shar­ing this information…I would def­in­itely try this method.

Reply
WCWhatsapp Clone

Thanks for this article.!
there will be a part of what­s­app clone

Reply
GPGabriel part

Please state the blog URL and any oth­er details that you con­sider rel­ev­ant, so we can address your issue quickly.
Hi
I’m hav­ing some issues with author­ship thumb­nail from appear­ing on search results;
The mes­sage on Struc­tured Data Test­ing Tool is:
Error: Miss­ing required field “updated”.

I tried :
1) Remove hentry from

and

DIDN’T FIND in my HTML CODE template

2) Change :

DIDN’T FIND in my HTML CODE

3) Change:

DIDN’T FIND in my HTML CODE

ANY OTHER IDEAS

Thank you!

Reply
Llazar

Hi,

I’m using a cus­tom twenty twelve theme and have — Miss­ing required field “updated” & Miss­ing required hCard “author” error. This error I get on all pages except the index page. I use “seo boost­er pro” plugin.

can you help me to resolve this problem?

thanks in advance

Reply
NNigel

Hi, Do you have any idea on how to fix this with a gen­es­is theme and using WP Social SEO Booster?

Reply
JSJon Scaife

I’ll look into it as soon as I get time — been very busy with work so this site has been a bit neg­lected recently.

Reply
JSJon Scaife

What theme are you using? If it’s a paid-for theme you’ll need to either send me a copy or give me access to the files some­how so I can have a look. If it’s a free theme just let me know and I’ll get back to you with some instruc­tions, or pre-edited files.

Reply
JSJon Scaife

If you can send me a zipped up copy of your theme I’ll have a look in the next day or 2. I see the funky URL — oops 🙂

Reply
AAl

Jon, i have 2 word­press sites that i can get the google snipptes To Work.
Can you help me?
If so please con­tact me ..

Albert

Reply
JSJon Scaife

What theme are you using? If it’s a paid-for theme you’ll need to either send me a copy or give me access to the files some­how so I can have a look. If it’s a free theme just let me know and I’ll get back to you with some instruc­tions, or pre-edited files.

Reply
Ssureshranju

Really nice art­icle thanks bro. I’ve writ­ten an art­icle with details of how to fix the hcard error with blog­ger templates

Reply
Ggovpatel

Hello

I am using a Artisteer soft­ware to cre­ate my theme and I am get­ting same error

Extrac­ted struc­tured data
hatom-feed
hatom-entry:
Warn­ing: At least one field must be set for HatomEntry.
Warn­ing: Miss­ing required field “entry-title”.
Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”.

Can you help me with what I need to do to clear the error.

Govindji Patel

Reply
JSJon Scaife

You’re build­ing a cus­tom theme?
Have a look at the code for one of the examples — the twenty elev­en theme is prob­ably a good example to look at. If you’re still strug­gling, when you’ve fin­ished your theme, send me a zipped copy and I can look at it for you. Cheers 🙂

Reply
Ggovpatel

Hello Jon Scaife

Thank you for your reply how do I send you zip file for you to check on my theme.

Govindji Patel

Reply
JSJon Scaife

I’m cur­rently work­ing on updated guides — I could­n’t see an e‑mail from you. If you want to send it again I’ll hap­pily doc­u­ment it

Reply
SShariar

HI,
Can you please help me out with
Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”.

Here is what in my content-single.php

at

i’ve tried with <span class=“fn”
at
But no luck

Reply
JSJon Scaife

I think your com­ment got mangled and some­how was­n’t flagged up to me as one I had­n’t replied to — I’m sorry about that. Have you got your theme fixed now? If not, get in touch and I’ll see what I can do to help you sort it out

Reply
MSMartin Smith

Hey Jon,

I’ve just sent a mes­sage via your con­tact page. I’m hav­ing real issues try­ing to fig­ure out the Rich Snip­pets on a word­press page i’m work­ing on.

Thanks,
Martin

Reply
JSJon Scaife

Hiya Mar­tin,

I see you’ve got author­ship inform­a­tion work­ing ok — it’s just the
“updated” and “author” hcard parts for each post that are fail­ing the
test­ing tool.

I’ll have a look and see what I can do — what theme are you using?

Thanks

Reply
SMShimul Mahmud

Thanks for article…
I’m using the word­press theme “slid­ing door”. I can­’t find the file “libphppost.class.php” in my theme…

I get these errors show­ing for my site:

Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”

Please help me…

Reply
JSJon Scaife

That file is spe­cif­ic to the Me Gusta theme, you wont find it in your theme. You should try the gen­er­ic instruc­tions or the instruc­tions for Mys­tique 2 or Twenty Elev­en — have a look in index.php, single.php, archive.php etc.

If you’re still strug­gling zip the theme up and e‑mail it to me and I’ll take a look.

Reply
AAfif

Hi, I am using a premi­um theme and just can­’t seem to find the cor­rect line. Sent you an email with the theme. Hope you can have a look at it.

Thanks a bunch

Reply
AAfif

I can­’t thank you enough, I no longer have the errors thanks to your fix.
I must com­mend you for your reply being faster than I could expect from the premi­um theme provider.

Thanks again

Reply
NKNick Keizer

Thanks for this article.

I have the author­ship veri­fied now and it’s work­ing for all pages. The prob­lem I’m hav­ing is I can­’t get these errors cleared:

Warn­ing: At least one field must be set for HatomEntry.
Warn­ing: Miss­ing required field “entry-title”.
Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”.

I’m using Mys­tique ver­sion 2.4.2 which I have mod­i­fied con­sid­er­ably (that may be the prob­lem). I did exactly as you spe­cify and I even added the and lines in sev­er­al oth­er files (index.php, author.php, archives.php, etc.), but still no luck.

Any oth­er sug­ges­tions? Thanks for any help you can provide!

Nick

Reply
JSJon Scaife

I’ll have a look at Mys­tique 2.4.2 in the next week and update the instruc­tions if things have changed. If not I’ll have to have a look at your mod­i­fied code. Will let you know in next few days.
Cheers

Reply
JSJon Scaife

D’oh — I was being dopey — Mys­tique 2.4.2 is quite old. I some­how read it as 3.4.2. For 2.4.2 I would have thought my ori­gin­al set of instruc­tions should work (the ones pri­or to the update).

Reply
JSJon Scaife

I’ve updated the article(s) and cre­ated sep­ar­ate posts for Mys­tique 2 and 3 to avoid con­fu­sion. The Mys­tique 2 instruc­tions work for Mys­tique 2.4.2 — let me know how you get on 🙂

Reply
LLisa

What if you don’t have a single PHP file? I have those exact errors as you stated above. I have a cus­tom theme. Thanks!

Reply
JSJon Scaife

Have a look at the tem­plate hier­archy docs. I’m guess­ing if you don’t have single.php the first place to look is index.php but cus­tom themes are some­times a pain to fig­ure out. If you’re still strug­gling you can zip up your whole theme and e‑mail it to me to have a look at.

Reply
SKSam Kear

Thanks for the guide, it worked great for me. This had been bug­ging me for a while and I’m glad to finally have it fixed.

Reply
JSJon Scaife

A pleas­ure

one oth­er tip — google don’t seem to like it if you have more than 1 type of rich snip­pets in use. Cur­rently it seems only micro­formats actu­ally work, but google are recom­mend­ing microdata and i anti­cip­ate they will switch soon. I would recom­mend includ­ing all the data for both, but exclud­ing the ini­tial item­type and item­scope. This pre­vents google recog­nising the microdata and avoids the prob­lem of hav­ing more than 1 type, but means that when google do switch all you have to do is re-add the item­type and item­scope and all the rest of the microdata will show up. you can then remove the micro­formats con­tent at your leis­ure. The rich snip­pet test­ing tool will hap­pily val­id­ate both types at once, its only things like recipes (where you need to be white lis­ted) where hav­ing both types is a problem.
I think its a shame google have opted for microdata rather than micro­formats. Microdata was lower over­head in a way because it does­n’t require any new prop­er­ties — its eco­nom­ic­al to use classes as you can also apply styles to them. on the oth­er hand, microdata is less con­fus­ing for pre­cisely the same reas­on — if there is an item­prop or item­type or item­scope you know its for microdata and if there is a class you know its for styl­ing. I guess over­all its a score draw. I believe bing are back­ing microdata too, so pre­sum­ably that means yahoo as well, which makes for pretty much the entire Eng­lish lan­guage search engine market

Reply
HHarald

Thanks very much for this article.

I used this, even I have the zBench theme:

<span class=“value-title” title=””>
<span class=“value-title” title=””>

in order to solve these problems:

Warn­ing: Miss­ing required field “entry-title”.
Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”.

Now, when check­ing with the
Rich Snip­pets Test­ing Tool
https://www.google.com/webmasters/tools/richsnippets
all is fine AS LONG AS I check on single post level, e.g.
http://www.mediawireless.eu/2012/seo-pr-suchmaschinenoptimierung-public-relations/
but it is still not ok, when check­ing the domain only
http://www.mediawireless.eu/

Any idea, help or suggestion?

Best, Har­ald

Reply
JSJon Scaife

What file(s) did you edit? The index page (and archive pages) are often gen­er­ated using a dif­fer­ent PHP file. If you edited single.php you might also need to edit index.php or archive.php. If that IS the case you may also need to edit page.php search.php and author.php if they exist. Dif­fer­ent themes do it dif­fer­ent ways

On the plus side, if you’ve got it work­ing on single posts you’re 95% of the way there 🙂

Reply
RCRob Cairns

On one site I am work­ing on run­ning Gen­es­is with no child theme, I am still hav­ing an error. can you make a sug­ges­tion Jon? The error is : Warn­ing: Miss­ing required field “updated”. with the full txt below.

Thanks

Rob

hfeed
hentry
entry-title = Win a Copy of Pic­ture Col­lage Maker Pro for Windows
entry-con­tent = Noth­ing delights me more than dis­cov­er­ing afford­able, easy to use soft­ware that will allow me to have fun cre­at­ing unique, last­ing memor­ies with pic­tures. My good friend Shan­non over at Coupon…
pub­lished = 03/26/2012
hcard
fn = Jean Parks
Rel
name = Win a Copy of Pic­ture Col­lage Maker Pro for Windows
rel = bookmark
url =
Rel
name = View all posts in Giveaways
rel = tag
url =
Warn­ing: Miss­ing required field “updated”.

Reply
JSJon Scaife

Yep. You have a “pub­lished” field, but not an “updated” field. If you want to do a “quick fix” you can just add class “updated” to the same class as “pub­lished” (e.g. so span class=“published” becomes span class=“published updated”. Strictly tho, if you update a post you’ll be sup­ply­ing incor­rect data, so when I’ve done edits I’ve edited the PHP to check if the post has been updated. If it has­n’t then the out­put is exactly as above, but if the post has been updated then I out­put 2 spans, one with the pub­lished date and one with the updated date and apply an appro­pri­ate span to both.
Hope­fully the above makes sense and you can sort it, but if it does­n’t then gimme anoth­er shout. You can always use the form on the about page to send me e‑mail and then maybe send me the file in ques­tion for me to have a look at.

Reply
JJeanette

Hi Jon, I am using gen­es­is with child theme. I installed a plu­gin called “gen­es­is simple hooks” to fix the warn­ing miss­ing fields but the “updated” part is still show­ing. I would like to find out how exactly the code looks like. Can you do that? I would appre­ci­ate it. I also have a pub­lished field. Thanks…

Reply
JSJon Scaife

Thanks Muhammad — those look like great instruc­tions for blog­ger users. Cheers for shar­ing the link 🙂

Reply
Nnoskill1343

Warn­ing: At least one field must be set for Hcard.
Warn­ing: Miss­ing required field “updated”.

I have same prob­lem, but in blog­spot, any suggestion?
I try to remove hfeed and hentry, but rich snip­pet still not works

Reply
JSJon Scaife

You can­’t remove hfeed and hentry and expect rich snip­pets to work
You need to add some tags. Lets assume the the “hfeed” and “hentry” are classes applied to 2 nes­ted divs. Inside the inner div (with class “hentry”) you need anoth­er tag (prob­ably a div, span or p) with the hcard stuff (via classes). You also need anoth­er tag with class=“updated” and inside that tag you need the updated date for the post. The easi­est way to do this is to just add class=“updated” to the exist­ing con­tain­er for the updated date inform­a­tion. I don’t use blog­ger so I can­’t tell you exactly how off the top of my head, but if you can­’t fig­ure it out drop me anoth­er shout and I’ll sign back up for blog­ger and sort some code for you. If you do man­age to fix it, it would be great if you could post below (or e‑mail me) to let us know how you fixed it. Sorry for the delay reply­ing, it’s been a very busy couple of weeks. Cheers 🙂

Reply
Nnoskill1343

Hi, thanx a lot for your reply, my prob­lem has been solved, rich snip­pet is appear per­fectly in Google loc­al (google.co.id), but not appear in google.com.

Reply
DKdarko kovancives

How do I add this code to the thes­is theme? single.php does not exist in the thes­is folders.

Reply
JSJon Scaife

Without know­ing what files you do have I can­’t say. Unless I’m mis­taken Thes­is isn’t a free theme so I can­’t have a look at it. Assum­ing it uses the stand­ard Tem­plate Hier­archy I’d guess that the code would be some­where in index.php. In my exper­i­ence though it is more likely that index.php will be quite short and prob­ably pulls in oth­er files. Start by look­ing in index.php and if you get no luck zip a copy of index.php up, stick it up some­where and send me the url and I’ll have a look.

Reply
DKdarko kovancives

hi, once again many thanks. I’ll write an art­icle about you, you are king when it comes to seo.

Reply
Mm33r4

Hi there. I have cre­ated my recipe snip­pet but get­ting the fol­low­ing error code and I truly don’t know how to rec­ti­fy that:

Extrac­ted rich snip­pet data from the page
hrecipe
Warn­ing: At least one field must be set for Hrecipe.
hrecipe
Warn­ing: At least one field must be set for Hrecipe.

Help please?

Many thanks.

Reply
JSJon Scaife

Sorry for the delay reply­ing. I take it that you have a class=“hrecipe” applied to an ele­ment some­where? E.g. a span or a div? Before you close that ele­ment you need oth­er ele­ments inside it with the required fields. If you apply class=“hrecipe” to a par­ent ele­ment like the tag then all your oth­er ele­ments should be inside it. You need things like fn, yield, enzovoort. Have a look at the example page google offer — https://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fallrecipes.com%2Frecipe%2Fbanana-banana-bread%2F

Reply
GEGaurav Ekka

finally cor­rec­ted the

Warn­ing: At least one field must be set for Hcard.
Warn­ing: At least one field must be set for HatomEntry.
Warn­ing: Miss­ing required field “entry-title”.
Warn­ing: Miss­ing required field “updated”.
Warn­ing: Miss­ing required hCard “author”.

Thank you Jon

Reply