[Resolved] Google Webmaster Tools Errors = Missing: author Missing: updated

Home Forums Support [Resolved] Google Webmaster Tools Errors = Missing: author Missing: updated

Home Forums Support Google Webmaster Tools Errors = Missing: author Missing: updated

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #165056
    Todd

    Hi Tom, Just noticed in Google Webmaster Tools, a couple of static pages are showing Errors = Missing: author Missing: updated.

    Does this have any negative effect on the site’s performance, or does it need to be corrected? If so, how would I go about doing that?

    Thanks!!!

    #165129
    Tom
    Lead Developer
    Lead Developer

    Hi Todd,

    It doesn’t have any negative effect on performance.

    Typically, static pages don’t have author or updated/published tags – these tags are usually reserved for posts etc..

    I need to look in to what Google thinks about adding these to pages but having them hidden (no one wants an author name or date on their static pages).

    #236390
    Olga

    Hi, Tom!
    I have such errors on every page.
    Maybe because I hid this elements in theme customizer? http://joxi.ru/Dr83RQvuLbY4A6.png

    Can I turn hEntry off like in this article? https://kb.yoast.com/kb/fixing-hcard-author-error/ If yes, where is better to place the code?

    #236467
    Tom
    Lead Developer
    Lead Developer

    Those “errors” won’t hurt your website, but it is because those elements aren’t present.

    You can remove the .hentry class with this function:

    function tu_remove_hentry( $class ) {
    	$class = array_diff( $class, array( 'hentry' ) );	
    	return $class;
    }
    add_filter( 'post_class', 'tu_remove_hentry' );
    #236825
    Olga

    Thank you, Tom! I put this code to Simple PHP plugin. I hope it’s right place to it)

    #237009
    Tom
    Lead Developer
    Lead Developer

    That’s perfect 🙂

    #262933
    John

    Tom,

    Is it possible to remove the hatom @ type for tags or hatom altogether?

    I placed the code into my functions.php and it did not work.

    
    function tu_remove_hentry( $class ) {
    	$class = array_diff( $class, array( 'hentry' ) );	
    	return $class;
    }
    add_filter( 'post_class', 'tu_remove_hentry' );
    
    #263010
    Tom
    Lead Developer
    Lead Developer

    Not really sure what you mean?

    That code will remove the hentry class from your post elements.

    #263073
    John

    Thanks for the reply Tom. After a few hours I finally got it cleared up. I am very amateur at coding and rely heavily on other examples.

    For this project/website I am testing differences between a site that has full markups (schema etc..) and one without. I am not using it as a blog.

    From my understanding, the hentry and hatom markups are something wordpress injects to signify that the content is syndicatable (if that’s a word?)

    I was able to manually remove all references of hentry/hatom markups by modifying files in my child theme removing markups such as:

    entry-header
    entry-meta
    entry-summary
    entry-content
    etc

    Additionally, I removed all link tags such as:

    rel=”home”
    rel=”bookmark”
    etc

    Further, I added code to my functions.php to remove the rel=”category” and rel=”tag” markups.

    Thanks,

    JB

    #263181
    Tom
    Lead Developer
    Lead Developer

    Glad you got it all working.

    Not sure if editing those classes are necessary, although maybe schema.org targets them.

    #338856
    Thomas

    Is there a way to fix this so that the author structured data will work for posts, and disable for tags, categories, and static pages?

    Also, with the code snippet mentioned above, I am not clear on where that code is supposed to be placed.

    Thanks,
    Tom

    #338910
    Tom
    Lead Developer
    Lead Developer

    So you want to remove the author completely from everywhere except for single posts?

    The PHP can be added using these instructions: https://docs.generatepress.com/article/adding-php/

    #339108
    Thomas

    Thanks for the instructions.

    Yes, I would like to keep the author attribute for posts and remove it from other areas of the site in order to clean up the Google Search Console issue.

    #339787
    Tom
    Lead Developer
    Lead Developer

    Try this:

    add_filter( 'generate_post_author_output', 'tu_post_author_single_only' );
    function tu_post_author_single_only( $output ) {
        if ( is_single() ) {
            return $output;
        }
    
        return false;
    }
Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.