Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1304102
    peterjonker
    Participant

    I get an error in my Google Search Console that my author, entry title and updated are missing in my hEntry. My website is http://www.fietsstoelexpert.com.

    #1304130
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add the following code into your Customizer, Custom > CSS area.

    
    // Fix "Missing Author" and "Missing Updated" issue - START
    // =============================================================================
    add_filter( 'the_content', 'custom_author_code');
    
    function custom_author_code($content) {
       if ( is_singular('post') ) {
          return $content . 
          '<div class="hatom-extra hidden"><span class="title">'. get_the_title() .'</span> was last modified: <span class="updated"> '. get_the_modified_time('F jS, Y') .'</span> by <span class="author vcard"><span class="fn">'. get_the_author() .'</span></span></div>' ;
       } else {
          return $content;
       }
    }
    // =============================================================================
    

    Hope that helps.

    #1304360
    peterjonker
    Participant

    Hi Darshana,

    Thanks for your quick reply. I Downloaded the child theme, installed it and posted the whole code as you mentioned above in my custom CSS.

    Hope it worked (I’ll have to check my search console the coming days).

    Thanks a lot!

    #1304368
    Christopher
    Moderator

    Hi there,

    Sorry, Darshana made a typo mistake. You should add provided code in child theme’s functions.php file not CSS.
    So please remove it from customizer and add it in functions.php file.

    Thanks.

    #1304376
    peterjonker
    Participant

    Oke, no worries. Done!

    #1304380
    Christopher
    Moderator

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1304102 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>