Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #106561
    maviedecoeliaque
    Participant

    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

    #106572
    Mahesh
    Participant

    @maviedecoeliaque: Please post in your site url. I checked the demo with google structured data testing tool and didn’t get any issues.

    Regards,
    Mahesh

    #106587
    baneff
    Participant
    #106796
    maviedecoeliaque
    Participant

    I’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

    #106806
    baneff
    Participant

    @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.

    #106837
    maviedecoeliaque
    Participant

    Thank 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

    #106841
    baneff
    Participant

    @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.

    #106843
    baneff
    Participant

    @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; }

    #106844
    maviedecoeliaque
    Participant

    Thank 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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Hatom error (updated and author) and schema.org error (person homelocation)’ is closed to new replies.