Tagged: author, search console
- This topic has 8 replies, 3 voices, and was last updated 7 years, 10 months ago by maviedecoeliaque.
-
AuthorPosts
-
January 6, 2017 at 3:33 pm #106561maviedecoeliaqueParticipant
Hello !
I’m searching some help to fix errors in Google Search Console.
I have 4 errors in “hatom (balisage : microformats.org)” with missing required field author and updated.
I have 1 error in “Person (balisage : schema.org)” with missing required field homelocation.
All this errors seem to be in the Html code for all my page in my blog but I don’t understand how I can fix it and why there are this errors. I haven’t change anything to make this bug happen.
Sorry for my english I’m french and I’m not good in code.
Thank you so much for your help !
Mathilde
January 6, 2017 at 4:47 pm #106572MaheshParticipant@maviedecoeliaque: Please post in your site url. I checked the demo with google structured data testing tool and didn’t get any issues.
Regards,
MaheshJanuary 6, 2017 at 6:17 pm #106587baneffParticipantJanuary 10, 2017 at 12:41 am #106796maviedecoeliaqueParticipantI’m sorry I didn’t have my computer with me this last days. Thanks for your help !
@Mahesh my site url is https://maviedecoeliaque.fr
@Baneff thanks for the post but I don’t understand what can I do to fix the problem ?Thanks a lot
Mathilde
January 10, 2017 at 4:58 am #106806baneffParticipant@maviedecoeliaque: Below there is easiest way for non-programmers, I think.
1. Install the plugin My Custom Functions
2. Add to the plugin the following code:// Fix for Google hAtom Missing author and updated 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'); function add_mod_hatom_data($content) { if ( is_single() || is_page()) { $content .= '<div class="hatom-extra">Was last modified <span class="updated"> '.get_the_modified_time('j F Y').'</span> by <span class="author vcard"><span class="fn">'.get_the_author().'</span></span></div>'; } return $content; } add_filter('the_content', 'add_mod_hatom_data');
3. Wait a few weeks until Google will index your site again.
January 10, 2017 at 6:16 pm #106837maviedecoeliaqueParticipantThank you so much ! I did it this morning. I hope it will fix my problem in few weeks 🙂
Do you know what error did I do to have this problem ?Thanks
Best regards
Mathilde
January 10, 2017 at 6:59 pm #106841baneffParticipant@maviedecoeliaque: It is not your fault. Rather, it is an incomplete service of Free version of the theme. Perhaps this was corrected in Pro version of the theme, but I’m not sure.
January 10, 2017 at 7:36 pm #106843baneffParticipant@maviedecoeliaque: In addition, you can change the phrase “Was last modified” to “La dernière modification” and the word “by” to “par” in the above code for example. Then a message about last modified date and author on the bottom of each page of your site will be displayed in your language.
You can also change the style of the message, such as shown below for example.
Go to Dashboard=> Appearance=> Customize=> Additional CSS box and add the following CSS:
.hatom-extra { margin-top: 10px; font-size: 10px; text-align: center; }
January 10, 2017 at 8:09 pm #106844maviedecoeliaqueParticipantThank you so much for everything and for the time you past to fix my problem ! It’s nicer with the last code you’re right 🙂
Best regards !
Mathilde
-
AuthorPosts
- The topic ‘Hatom error (updated and author) and schema.org error (person homelocation)’ is closed to new replies.