WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
Passing the Google Structured Data Testing Tool (2 posts)

  1. an52
    Member
    Posted 6 months 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>

    and

    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>

    or
    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>

    or

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

    Where can I do this?

  2. ElectricFeet
    Member
    Posted 6 months ago #

    I've flagged this for nikeo's attention.

Reply

You must log in to post.

About this Theme

About this Topic