[Resolved] Structured Data Errors Showing in Google Search Console (Webmaster Tools)

Home Forums Support [Resolved] Structured Data Errors Showing in Google Search Console (Webmaster Tools)

Home Forums Support Structured Data Errors Showing in Google Search Console (Webmaster Tools)

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #478684
    Edin

    I’ve noticed some errors in the rich snippet tool from Google:

    Missing: author
    Missing: updated

    I fear that this has negative implications on ranking in the search engines.

    Is there a way to fix this?

    Thank you!

    GeneratePress 2.0.2
    #478991
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It shouldn’t have any negative impact, but it helps having those elements.

    Is there a specific page you’re testing for this I can check out?

    #479015
    Edin

    Hi Tom,

    The Google Search Console says that the error is on every page of the site (I’ve entered the URL when starting this topic).

    Thanks,
    Edin

    #479344
    Tom
    Lead Developer
    Lead Developer

    It looks like you’ve removed the author and date, which is what those errors are complaining about.

    It won’t hurt your rankings, but Google is looking for those elements, and they don’t exist.

    #479357
    Edin

    I haven’t removed them consciously… where should they be, and how do I add them back in?

    #479358
    Edin

    When you look at the pages you see that the author is displayed right below the post title… that’s weird.

    #479830
    Edin

    Okay, I think I found a fix. According to Yoast, I should change:

    <span class="author_name"><?php the_author(); ?></span>

    to

    <span class="vcard author author_name"><span class="fn"><?php the_author(); ?></span></span>

    Problem is, I have this in “After Entry Title”:

    <a class="author-name" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><?php the_author(); ?></a>

    What would be the corresponding change here?

    Thank you so much for your help so far!

    #479912
    Tom
    Lead Developer
    Lead Developer

    So you’ve added that code inside GP Hooks instead of using the core author display?

    You should be able to add the markup like this:

    <span class="vcard author author_name"><a class="author-name" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ); ?>"><span class="fn"><?php the_author(); ?></span></a></span>

    #480193
    Edin

    Thank you so much Tom, that worked beautifully!

    I’ve also tried to add the “update time”, can you please tell if this is correct?

    <span class="date updated published"><time datetime="<?php the_modified_time('Y-m-d'); ?>"><?php the_modified_time('F jS, Y'); ?></time></span>

    Thanks again,
    Edin

    #480625
    Tom
    Lead Developer
    Lead Developer

    You’d have to do this:

    <span class="date updated published"><time datetime="<?php the_modified_time('Y-m-d'); ?>" itemprop="dateModified"><?php the_modified_time('F jS, Y'); ?></time></span>

    #480644
    Edin

    Awesome Tom! That worked as well.

    I want to thank you for all your help so far. The support and willingness to help out is really amazing, on top of that great product that you offer.

    Thanks again!

    #480649
    Tom
    Lead Developer
    Lead Developer
Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.