Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1333983
    dylan l
    Participant

    Hi,

    I am getting hentry errors “missing: author” and “missing: updated” in the Google Search Console. My site is https://londonpsychologist.pro.

    Any advice?

    #1334162
    Nabeel A
    Moderator

    Hi there,

    Thanks for writing in! Try adding the following code in your Child Theme’s functions.php file:

    //add hatom data
    function add_suf_hatom_data($content) {
        $t = get_the_modified_time('F jS, Y');
        $author = get_the_author();
        $title = get_the_title();
    if (is_home() || is_singular() || is_archive() ) {
            $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
        }
        return $content;
        }
    add_filter('the_content', 'add_suf_hatom_data');

    Let us know how this goes!

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