Support » Plugins » Structured Data Errors — theme Twenty Twelve

  • I’m using the theme Twenty Twelve and I have searched high and low across the Internet for the solution to my problem. I’m getting this error in google webmaster tools:

    Error: Missing required field “updated”.
    Error: Missing required hCard “author”.

    My site is a site with hundreds of static PAGES, not posts. I do have a blog that goes along with the site, but I don’t even have those posts indexed. I only care about the pages.

    I have implemented the “entry-date updated” fix I’ve seen all over the place in the functions.php file (line 375; latest version of Twenty Tweleve; version 1.4). I still am getting the errors for all my static pages.

    I have the message that authorship is working for the page.

    However, in the “extracted structured data” section, I get the above-mentioned errors for all my site’s pages.

    As I said, I have authorship working. My google+ account is successfully linked with my site.

    So, is there any obvious, simple fix to this problem that I’m missing?

    Any help would be appreciated. I know there are multiple posts about this on the Internet and on these forums, but I can’t find the fix for my specific problem.

    My site:

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m still working on the problem. Any assistance would be greatly appreciated. I’ve solved half of it.

    I found this line in the content-page.php file:

    <h1 class=”entry-title”><?php the_title(); ?></h1>

    and I changed it to this:

    <h1 class=”entry-title updated”><?php the_title(); ?></h1>

    I just added the word updated.

    Now the updated error that I posted in my original post is gone. Remember this is for the theme “twenty twelve” pages, not posts.

    I still have the following error and not even sure it can be fixed! I’m sure it can. But maybe twenty twelve doesn’t have any support for author markup in pages. I don’t know.

    Error: Missing required hCard “author”.

    Any help? Would love it if someone could help.


    Yes, it is actually pretty simple. I provide a solution here:

    you basically want to get the modification time of an article in ISO notation via $datemodifiedISO = get_the_modified_time("c"); and include this in the HTML in a time tag containing the updated CSS class, like so:

    echo '<time class="updated" datetime="'.$datemodifiedISO.'" pubdate>'.$datecreated.'</time>

    Make sure that $datecreated is defined, too, of course :). For a more complete example and explanation, see the linked article.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Structured Data Errors — theme Twenty Twelve’ is closed to new replies.