-
AuthorPosts
-
November 20th, 2014 at 19:52 #28315Valérie
Hello,
In the Google Structured Data in Google Webmaster Tools, I get the errors :
Erreur : Missing required field “entry-title”.
Erreur : Missing required field “updated”.
Erreur : Missing required hCard “author”.Does anyone knows how to modify the Mantra theme to avoid the errors ?
Thank you !
Valérie
(France)November 20th, 2014 at 22:29 #28318BebsHi Valerie,
I just finished correcting mine but I am using Parabola theme…I found this links to be helpful:
http://www.davidtiong.com/fix-hatom-microformats-at-least-one-field-must-be-set-for-hatomentry/
Hope this works for you too..
November 21st, 2014 at 21:00 #28336ValérieHi Bebs !
Really thank you for your message !
You really helped me.
I added the functions indicated in functions.php and now the “Missing required field “updated”” and “Missing required hCard “author”” errors are corrected 🙂
Unfortunately, I still have the “Missing required field “entry-title”” error and I don’t know why…
If, by chance you (or someone else) know how to correct this…
Anyway, thank you again !
November 22nd, 2014 at 14:48 #28348ValérieMy home page had no title that’s why the “Missing required field “entry-title”” error was still present. Now everything work fine !
February 3rd, 2015 at 01:59 #29341WalterHi Valerie and Bebs, did you add the code suggested to the functions.php file and it worked the same day?
I tried adding the code found on the page below right after <?php on Parabola: Theme Functions (functions.php)
http://www.davidtiong.com/fix-hatom-microformats-at-least-one-field-must-be-set-for-hatomentry/
Checked again on google webmaster and didn’t work.
Am I doing something wrong here?
Thank you
February 5th, 2015 at 15:23 #29368ValérieHi Walter !
Yes, I add the code in the functions.php et it worked the same day (immediately).
I use a child theme, so I created the file functions.php in my child theme directory and here is the full content of my file :
<?php //mod content function hatom_mod_post_content ($content) { if ( in_the_loop() && !is_page() ) { $content = '<span class="entry-content">'.$content.'</span>'; } return $content; } add_filter( 'the_content', 'hatom_mod_post_content'); //add hatom data function add_mod_hatom_data($content) { //$t = get_the_modified_time('F jS, Y'); $t = get_the_modified_time('d/m/Y'); $author = get_the_author(); $title = get_the_title(); if ( is_single() || is_page()) { $content .= '<div class="hatom-extra"><span class="entry-title">'.$title.'</span> a été modifié le <span class="updated"> '.$t.'</span> par la <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data'); // $content .= '<div class="hatom-extra"><span class="entry-title">'.$title.'</span> a été modifié le <span class="u//pdated"> '.$t.'</span> par la <span class="author vcard"><span class="fn">'.$author.'</span></span></div>'; ?>
Be carefull, I changed the date format in order to be printed as a French date format but, maybe it can help you to see how to integrate the code in your functions.file…
Good luck and I hope that you can find the problem.
Valérie
-
AuthorPosts
The topic ‘Erreur : Missing required field’ is closed to new replies.