Passing the Google Structured Data Testing Tool (2 posts)

  1. an52
    Posted 1 year ago #

    I was checking my site for correctly coded structured data and I get this error in Google Webmaster Tools. The tips on the web ask you to edit a line in single.php (which doesn't exist in Customizr afaik) and my site is largely made of Pages.

    One advice is as follows:

    Fix Missing required field “updated”

    look for the code below on your WordPress theme’s single.php file.
    001 <span class="post_date"><?php the_time('j F,Y'); ?></span>

    then add “date updated” attribute to it. Your code should look like
    001 <span class="post_date date updated"><?php the_time('j F,Y'); ?></span>


    Fix Warning: Missing required hCard “author” and Missing required field “name (fn)”

    This will fix these 2 warnings. On your WordPress theme’s single.php file, look for
    001 <span class="theauthor"><?php the_author_posts_link(); ?></span>

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

    replace it with

    001	<span class="vcard author">
    002	<span class="fn"><?php the_author_posts_link(); ?></span>
    003	</span>


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

    Where can I do this?

  2. ElectricFeet
    Posted 1 year ago #

    I've flagged this for nikeo's attention.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic