Please note!
This article has now been superceded by a new article, which has been updated to use MicroData (schema.org) instead of MicroFormats. If you still wish to use MicroFormats read on, but I recommend using MicroData and invite you to read the new article, which will continue to be updated with new information and new themes. [intlink id=“3500” type=“post”]New info on MicroData[/intlink].
Please note
I have moved the original contents of this post to new posts as the number of themes I have instructions for increases. There are now specific instructions for [intlink id=“2948” type=“post”]Mystique 2[/intlink], [intlink id=“2949” type=“post”]Mystique 3[/intlink], [intlink id=“2468” type=“post”]Thesis[/intlink], [intlink id=“3015” type=“post”]Twenty eleven[/intlink] and [intlink id=“3017” type=“post”]Me Gusta by Cosmos[/intlink]
The original [intlink id=“2948” type=“post”]Mystique 2 article[/intlink] is the most detailed if you are looking for additional information. Below I have provided a generic idea of what is required and where to start when trying to modify a new theme
Part 1: Authorship information
You need 3 parts for this — you need each post to contain a link to your author page, you need your author page to have a link to your google profile (or google+ page) and you need your google profile (or google+ page) to have a link pointing to your domain!
Deal with these in reverse order.
- Log in to google+ or your google profile and add a public (it does need to be public) link in your profile information pointing to your website. For example — on my google+ profile I have a link to https://diymediahome.org
- Use the code provided by Yoast to put a link to your google+ profile on your author page
- Install the Yoast SEO plugin or add the yoast code to functions.php
- Go to your user information page (Dashboard: Users: Your Profile) in wordpress and fill in the Google+ field (or Google Profile field if you used the yoast code) with a link to your google profile
- Edit your theme’s author.php, find the code which displays the author information (twitter account, website, etc.) and add an extra part in the same style to output the google+ link. Make sure the href has a
rel="me"
- Add code so that the author information for each post links to your author profile page with a
rel="author"
- This is the trickiest bit — it may involve multiple edits to multiple files. Start by looking 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 inrel="author"
- This is the trickiest bit — it may involve multiple edits to multiple files. Start by looking at single.php (which does single pages), index.php, search.php, archive.php etc. Look for the code which has a
Part 2: Required hCard information (e.g. updated, entry-title etc.)
Each post needs some correctly structured markup containing summary information about it.
- These edits will probably go in the same places as at least some of the author edits in instruction 3 in part 1. Likely locations are single.php, page.php, index.php, search.php, archive.php
- In many cases it is simply a case of adding some
rel=""
entries to the existing code — e.g. if your theme already shows an updated or posted line inside a p or inside a span you can addrel="updated"
to that p or span - You also need to add some more author related code — again, assuming 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 parent tag with a
rel="vcard"
- you need your name inside a tag with a
- All of these extra tags need to be inside a parent element (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 published works, but strictly speaking isn’t always correct. If you have actually updated a post then the updated and published dates will be different. Google will recognise both (as will humans if you show it) so it is better to add a bit of code that checks if the post has been updated. To get the published date use the function get_the_date()
and to get the updated date use the function get_the_modified_date()
. If it has been updated then display both the published date (with rel="published"
) and the updated date (with rel="updated"
). If the post hasn’t been updated then just put the published date with rel="updated published"
. An example of code which does this is included with the [intlink id=“2468” type=“post”]Thesis theme modifications[/intlink] article.
Thanks for sharing this information…I would definitely try this method.
Thanks for Sharing.
very nice blog
Nice article,It’s very useful article
Nice article and its very informative, Thank You.
Thanks for this article. !
there will be a part of whatsapp clone
Really a nice article. it is useful for all people. I wish you for your brightful future.
Please state the blog URL and any other details that you consider relevant, so we can address your issue quickly.
Hi
I’m having some issues with authorship thumbnail from appearing on search results ;
The message on Structured Data Testing Tool is:
Error: Missing 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!
Hi,
I’m using a custom twenty twelve theme and have — Missing required field “updated” & Missing required hCard “author” error. This error I get on all pages except the index page. I use “seo booster pro” plugin.
can you help me to resolve this problem?
thanks in advance
Hi, Do you have any idea on how to fix this with a genesis theme and using WP Social SEO Booster ?
I’ll look into it as soon as I get time — been very busy with work so this site has been a bit neglected recently.
Hello John,
I too am having the hATOM error, I’m not quite sure where to turn, I get the error:
hatom-feed
Warning: At least one field must be set for HatomFeed.
Any Ideas? Thanks,
— Craig Smith ¦ Immigration Consultant -
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 somehow 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 instructions, or pre-edited files.
Hi I’m having the same problem. the theme I’m using is https://wordpress.org/support/theme/vertimagazine/. I have fixed for the home page but not the inside pages like single post page, page, archives page. My site url is archampion.com. Can You help me take a look? Thanks.
Hi Jon,
I’m fairly new to WordPress, but I’m having similar trouble. I’m using the Canvas theme.
https://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.iwanttoquitsmoking.com%2Farticles%2Ffinally-a-method-that-works%2F&html=
Also. look at the funky URL for the Linked Google+ page:
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 🙂
Jon, i have 2 wordpress sites that i can get the google snipptes To Work.
Can you help me?
If so please contact me ..
Albert
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 somehow 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 instructions, or pre-edited files.
Really nice article thanks bro. I’ve written an article with details of how to fix the hcard error with blogger templates
Thanks for your comment and the useful link 🙂
Update 12-June-2013 — Link removed as it is now broken
Hello
I am using a Artisteer software to create my theme and I am getting same error
Extracted structured data
hatom-feed
hatom-entry:
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”.
Can you help me with what I need to do to clear the error.
Govindji Patel
You’re building a custom theme?
Have a look at the code for one of the examples — the twenty eleven theme is probably a good example to look at. If you’re still struggling, when you’ve finished your theme, send me a zipped copy and I can look at it for you. Cheers 🙂
Hello Jon Scaife
Thank you for your reply how do I send you zip file for you to check on my theme.
Govindji Patel
I’ve zapped you an e‑mail 🙂
Hello Jon Scaife
I replied and attached the zip file.
Govindji Patel
I’m currently working on updated guides — I couldn’t see an e‑mail from you. If you want to send it again I’ll happily document it
HI,
Can you please help me out with
Warning: Missing required field “updated”.
Warning: Missing required hCard “author”.
Here is what in my content-single.php
at
i’ve tried with <span class=“fn”
at
But no luck
I think your comment got mangled and somehow wasn’t flagged up to me as one I hadn’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
Hey Jon,
I’ve just sent a message via your contact page. I’m having real issues trying to figure out the Rich Snippets on a wordpress page i’m working on.
Thanks,
Martin
Hiya Martin,
I see you’ve got authorship information working ok — it’s just the
“updated” and “author” hcard parts for each post that are failing the
testing tool.
I’ll have a look and see what I can do — what theme are you using?
Thanks
Thanks for article…
I’m using the wordpress theme “sliding door”. I can’t find the file “libphppost.class.php” in my theme…
I get these errors showing for my site:
Warning: Missing required field “updated”.
Warning: Missing required hCard “author”
Please help me…
That file is specific to the Me Gusta theme, you wont find it in your theme. You should try the generic instructions or the instructions for Mystique 2 or Twenty Eleven — have a look in index.php, single.php, archive.php etc.
If you’re still struggling zip the theme up and e‑mail it to me and I’ll take a look.
Hi, I am using a premium theme and just can’t seem to find the correct line. Sent you an email with the theme. Hope you can have a look at it.
Thanks a bunch
I can’t thank you enough, I no longer have the errors thanks to your fix.
I must commend you for your reply being faster than I could expect from the premium theme provider.
Thanks again
No problem. For anyone else with Me Gusta theme by Cosmos the changes I made are documented on a dedicated post
Thanks for this article.
I have the authorship verified now and it’s working for all pages. The problem I’m having is I can’t get these errors cleared:
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”.
I’m using Mystique version 2.4.2 which I have modified considerably (that may be the problem). I did exactly as you specify and I even added the and lines in several other files (index.php, author.php, archives.php, etc.), but still no luck.
Any other suggestions? Thanks for any help you can provide!
Nick
I’ll have a look at Mystique 2.4.2 in the next week and update the instructions if things have changed. If not I’ll have to have a look at your modified code. Will let you know in next few days.
Cheers
D’oh — I was being dopey — Mystique 2.4.2 is quite old. I somehow read it as 3.4.2. For 2.4.2 I would have thought my original set of instructions should work (the ones prior to the update).
I’ve updated the article(s) and created separate posts for Mystique 2 and 3 to avoid confusion. The Mystique 2 instructions work for Mystique 2.4.2 — let me know how you get on 🙂
What if you don’t have a single PHP file? I have those exact errors as you stated above. I have a custom theme. Thanks!
Have a look at the template hierarchy docs. I’m guessing if you don’t have single.php the first place to look is index.php but custom themes are sometimes a pain to figure out. If you’re still struggling you can zip up your whole theme and e‑mail it to me to have a look at.
Thanks for the information.
Thanks for the guide, it worked great for me. This had been bugging me for a while and I’m glad to finally have it fixed.
A pleasure
one other tip — google don’t seem to like it if you have more than 1 type of rich snippets in use. Currently it seems only microformats actually work, but google are recommending microdata and i anticipate they will switch soon. I would recommend including all the data for both, but excluding the initial itemtype and itemscope. This prevents google recognising the microdata and avoids the problem of having more than 1 type, but means that when google do switch all you have to do is re-add the itemtype and itemscope and all the rest of the microdata will show up. you can then remove the microformats content at your leisure. The rich snippet testing tool will happily validate both types at once, its only things like recipes (where you need to be white listed) where having both types is a problem.
I think its a shame google have opted for microdata rather than microformats. Microdata was lower overhead in a way because it doesn’t require any new properties — its economical to use classes as you can also apply styles to them. on the other hand, microdata is less confusing for precisely the same reason — if there is an itemprop or itemtype or itemscope you know its for microdata and if there is a class you know its for styling. I guess overall its a score draw. I believe bing are backing microdata too, so presumably that means yahoo as well, which makes for pretty much the entire English language search engine market
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:
Warning: Missing required field “entry-title”.
Warning: Missing required field “updated”.
Warning: Missing required hCard “author”.
Now, when checking with the
Rich Snippets Testing 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 checking the domain only
http://www.mediawireless.eu/
Any idea, help or suggestion?
Best, Harald
What file(s) did you edit? The index page (and archive pages) are often generated using a different 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. Different themes do it different ways
On the plus side, if you’ve got it working on single posts you’re 95% of the way there 🙂
On one site I am working on running Genesis with no child theme, I am still having an error. can you make a suggestion Jon? The error is : Warning: Missing required field “updated”. with the full txt below.
Thanks
Rob
hfeed
hentry
entry-title = Win a Copy of Picture Collage Maker Pro for Windows
entry-content = Nothing delights me more than discovering affordable, easy to use software that will allow me to have fun creating unique, lasting memories with pictures. My good friend Shannon over at Coupon…
published = 03/26/2012
hcard
fn = Jean Parks
Rel
name = Win a Copy of Picture Collage Maker Pro for Windows
rel = bookmark
url =
Rel
name = View all posts in Giveaways
rel = tag
url =
Warning: Missing required field “updated”.
Yep. You have a “published” 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 “published” (e.g. so span class=“published” becomes span class=“published updated”. Strictly tho, if you update a post you’ll be supplying incorrect data, so when I’ve done edits I’ve edited the PHP to check if the post has been updated. If it hasn’t then the output is exactly as above, but if the post has been updated then I output 2 spans, one with the published date and one with the updated date and apply an appropriate span to both.
Hopefully the above makes sense and you can sort it, but if it doesn’t then gimme another shout. You can always use the form on the about page to send me e‑mail and then maybe send me the file in question for me to have a look at.
Hi Jon, I am using genesis with child theme. I installed a plugin called “genesis simple hooks” to fix the warning missing fields but the “updated” part is still showing. I would like to find out how exactly the code looks like. Can you do that? I would appreciate it. I also have a published field. Thanks…
Have you read this
[link removed due to being broken]
Thanks Muhammad — those look like great instructions for blogger users. Cheers for sharing the link 🙂
Thanks for this post, it helped me eliminate those last few pesky rich-snippet errors!
Warning: At least one field must be set for Hcard.
Warning: Missing required field “updated”.
I have same problem, but in blogspot, any suggestion?
I try to remove hfeed and hentry, but rich snippet still not works
You can’t remove hfeed and hentry and expect rich snippets to work
You need to add some tags. Lets assume the the “hfeed” and “hentry” are classes applied to 2 nested divs. Inside the inner div (with class “hentry”) you need another tag (probably a div, span or p) with the hcard stuff (via classes). You also need another tag with class=“updated” and inside that tag you need the updated date for the post. The easiest way to do this is to just add class=“updated” to the existing container for the updated date information. I don’t use blogger so I can’t tell you exactly how off the top of my head, but if you can’t figure it out drop me another shout and I’ll sign back up for blogger and sort some code for you. If you do manage 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 replying, it’s been a very busy couple of weeks. Cheers 🙂
Hi, thanx a lot for your reply, my problem has been solved, rich snippet is appear perfectly in Google local (google.co.id), but not appear in google.com.
How do I add this code to the thesis theme? single.php does not exist in the thesis folders.
Without knowing what files you do have I can’t say. Unless I’m mistaken Thesis isn’t a free theme so I can’t have a look at it. Assuming it uses the standard Template Hierarchy I’d guess that the code would be somewhere in index.php. In my experience though it is more likely that index.php will be quite short and probably pulls in other files. Start by looking in index.php and if you get no luck zip a copy of index.php up, stick it up somewhere and send me the url and I’ll have a look.
hi, once again many thanks. I’ll write an article about you, you are king when it comes to seo.
A pleasure. I’ve written a new article with the details in
Hi there. I have created my recipe snippet but getting the following error code and I truly don’t know how to rectify that:
Extracted rich snippet data from the page
hrecipe
Warning: At least one field must be set for Hrecipe.
hrecipe
Warning: At least one field must be set for Hrecipe.
Help please?
Many thanks.
Sorry for the delay replying. I take it that you have a class=“hrecipe” applied to an element somewhere? E.g. a span or a div? Before you close that element you need other elements inside it with the required fields. If you apply class=“hrecipe” to a parent element like the
tag then all your other elements should be inside it. You need things like fn, yield, etc. 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%2Ffinally corrected the
Thank you Jon
A pleasure. Good luck in the Cricket tonight too! 🙂