Google Structured Data Errors on WordPress Sites

I’ve just set up my Google+ Author profile, so I’ve got to be patient, and keep writing if I want those rich snippets to be to my posts what tinsel is to a Xmas tree. In the meantime, I thought I’d run a couple of my post URLs through the Structured Data Testing Tool and get a preview of the best case scenario, i.e. my face and all post info faithfully reproduced in the search result sample. Only… hold on, there was an irksome message from the Google deep waiting to greet me half way down the page:

‘Error: Missing required field “updated”‘

Well, hello there, Structured Data Error.

Structured Data Errors on WordPress Sites: Meme

Image credit: images4.fanpop.com

So what is causing these Structured Data errors on WordPress sites? What are they? What do they mean? And how do they affect, if at all, my Google ranking?
 

What is Structured Data

Basically, Structured Data is the info about your post. It tells Google who you are as an author, and includes extra information such as the title of your post, the content, when it was published and when it was last updated.
If any of this data is missing, your author profile and post info appearing in the Search Engine Results Pages might be incomplete.

The information in this article is restricted to Structured Data errors concerning single post entries, i.e. hentry format errors.
 

Do Structured Data Errors Matter

Should you ever bother to fix these? Or are they just annoying reminders like plugin updates in your WordPress admin? Well, that’s up to you, really. If you take your Google Authorship and your SERP ranking seriously, then you can’t afford to look the other way. This is basically Google saying “Hey, I can’t read all the information I require about your post!” And if it can’t read it, it sure won’t display it either.

Here is how your SERP listing may be affected by Structured Data Errors:

  • You may get lower Click Through Rate: The more users can tell about your link, the more information they can see, the more likely they are to click.
  • Your ranking may be affected: For example, if the date of your latest update is missing, then your post might be ranked lower, than one with a recognizable (and most recent) modification date.
  • Your Rich Snippets may not appear: Rich Snippets are everything from your photo, to stars on a review article, to detailed personal information.

So, you decide: do you want to be the lighthouse in a sea of links or another drop in the SERP ocean?

Only, it’s not that simple. Will Google display all your post information if you’ve followed the guidelines and are error free? Will it reward you for your efforts? Not necessarily. They say it themselves right on the Structured Data Testing Tool page next to your perfect results:

“Congratulations! However, please note that Google will only show your author portrait in search results when we think it will be useful to the user.”*

Your activity as an Author is, in the end, the decisive factor to your (rich) snippets showing or not, particularly your profile photo. The more often you write and the more valuable your content is to your readers, the more likely you are to benefit from the rich snippets feature. I currently have my profile photo showing for some of my posts(the most popular ones… coincidence?), but not others.

It takes time to build a reputation and a body of meaningful material you can attach your name to. But, in the meantime, you can clean up your hentry markup. That way you can disregard the error possibility as being the reason for your snippets not showing up. And the moment you see your face light up the SERPs you’ll know it’s because of your hard earned efforts as an Author… or yet another algorithm change by Google, but that’s a story for another post.

*Update: Google has recently decided to remove all author portraits from search results.
 

How to Check for Structured Data Errors

First of all, test one of your posts by pasting its URL into the Structured Data Testing Tool. Check for any red warnings in the ‘hatom-feed’ section.

Structured Data Error: Missing updated

Error: Missing required field “updated” in the Structured Data Testing Tool

If you want to get a complete list of all Structured Data errors for your site, check the site in your Webmaster Tools under Search Appearance > Structured Data.

Structured Data Errors in Webmaster Tools

Structured Data Errors in Webmaster Tools

The above screenshot shows my list of errors for weppot.com. Most of it, was the ‘Missing: updated’ error. I also had 3 ‘Missing: author’ errors, but those were low priority in my case, because they only concerned static pages.

Don’t despair if these errors still show up in your Webmaster Tools after you fix the error. Just check the last detected column every now and then. Hopefully, the error will disappear by the next crawl.
 

Structured Data Errors on WordPress Sites: the Cause

It’s your theme. Don’t you go blaming Yoast or WordPress, now. If any of the required fields are missing, it’s your theme that is not providing a class for it.

There are different types of formats to communicate this information to Google. Using Microdata is the method most recommended by Google. Microformats and RDFa are the other two.
The WordPress CMS uses the Microformats standard snippets markup tags for posts, specifically the hentry format.

“h-entry is a simple, open format for episodic or datestamped content on the web. h-entry is often used with content intended to be syndicated, e.g. blog posts.” (microformats.org)

All the info appears between the ‘hentry’ div class tags. Each post info item has a corresponding property. For example:

  • Post title = entry-title
  • Post content = entry-content
  • Post update date = updated
  • Post publication date = published
  • Post Author = author

These properties should be represented by a class of the same name in your theme’s css. In my case, the “updated” class was not defined by my theme(Genesis News Child theme), so the search engine could not find the required data.
 

How to Fix Structured Data Errors caused by WordPress Themes

Like Bananas in Pajamas, these errors often come in pairs, or in quartets! Here’s a list of the usual suspects:

  • Error: At least one field must be set for HatomEntry.
  • Error: Missing required field “entry-title”.
  • Error: Missing required field “updated”.
  • Error: Missing required hCard “author”.

I’m using Genesis News Child theme right now. It uses Microformats to relay the author and post info, which is not ideal. While Google Authorship is taken care of through my User profile and Yoast’s grace, the post info is another matter.

Right off the bat, I gotta disappoint some of you by stating the following:

  • There is no one single solution for all themes
  • You might need to know how to code or know someone who does

Themes differ in file structure, but also in the info they are able to access and display. Either way, all this information is available and stored in variables by your WordPress Content Management System. You just have to find a way to tease it out.

So, here’s the battle plan:

  • Check which errors you get in the Structured Data Testing Tool
  • Check theme settings, to see if you can activate the option anywhere
  • If the above is not an option, add the necessary code/css to get the missing tags in your HTML
  • If above fails, try your luck with a more hentry Structured Data friendly theme

Browsing around I came across lots of coding solutions, which differ from theme to theme or framework to framework. Some were buggy, and neither one fixed my particular issue. This is what worked for me.
 

Solution For Genesis News Child Theme

I was looking for a solution that would not only feed the missing data to Google behind the scenes, but also display it on my page. That’s why I wanted to make a shortcode I could insert anywhere in my post.

I credit my techie business partner for coming up with the following workaround.

You’ll need:

  • Access to functions.php for the News Child Theme located in: public_html/wp-content/themes/news/
  • The Genesis Simple Edits Plugin

Step 1

Paste the following code at the end of functions.php:

add_shortcode( 'post_update', 'genesis_post_update_shortcode' );
/**
* Produces the latest post update.
*
* @return string Shortcode output
*/
function genesis_post_update_shortcode( $atts ) {
     $output = '<span class="updated">' . the_modified_date('F j, Y', '', '', false). '</span>';
     return apply_filters( 'genesis_post_update_shortcode', $output, $atts );
}

This code retrieves the last updated date of your post and returns a string, that consists of plain text and HTML code that can be inserted within your post’s HTML. It also creates a shortcode called ‘post_update’ that can be inserted within your posts or pages.

See a sample HTML of the generated text in bold below in the context of the post-info div:

<div class="post-info">
  <span class="date published time" title="2013-10-14T21:54:14+00:00">October 14, 2013</span>  
  By
  <span class="author vcard"><span class="fn">Alicia Kolesnikova</span></span> <br />
  Last updated on
  <span class="updated">February 25, 2014</span>
</div>

By the way, if you can write more elegant code, that includes an option with an HTML5 workaround, I’ll be happy to hear from you and test it out!

Step 2

To get the text to show up where you want it, which is within the post-info section, go to Simple Edits and paste the following into the Post Info section:
Last updated on August 11, 2014.
Genesis Simple Edits

This will add the Last updated date on a new line. Of course, you can format it differently if you prefer.
Solution Result

I did try inserting code via Simple Hooks. But I couldn’t find a way to insert code to be executed directly in the post-info section. Logically, the author’s name, published date and last modified date belong together. So, it seemed odd to place the last updated info in an external div(section), not above it or below it.
 

Final Thoughts

For those of you wondering ‘Can’t a plugin do it?’, I say I couldn’t find one. I have Schema Creator by Raven installed, which is good for adding Rich Snippets markup to your posts, but it does not take care of basic post info, which is what I was missing here.

I was also tempted to use ‘ ‘itemprop WP for SERP/SEO Rich snippets’ plugin, but this plugin uses Microdata formatting and Google advises against mixing markup standards.
Nevertheless, I hope in the not so distant future there will be a plugin to deal with hentry Structured Data issues for WordPress users, and perhaps, encapsulate this functionality in a theme-independent module.
 

Resources

WordPress.org Codex
Google Webmasters Support
Microformats.org
Terry Simmonds via Google Authorship community

Alternative Solutions

Note: I have not tried these particular ones myself. So, I can’t promise they will work.
Acceleratormarketing.com
WordPress.org Support
 
 

Leave a Reply

About Alicia Kolesnikova

Blogger & blogging advocate. An avid WordPress explorer and occasional shutter release pusher. Follow me on for extra blogging tips.

Comments

  1. Alicia Thanks for posting this a couple of questions and clarification re Genesis I also use genesis (their latest update and lifestyle theme version 1.0 )

    Mine is a static site no blogs as yet but planning to, however I am confused since mine are all pages not actual blog pages yet even for page even all have same errors in webmaster tools and Structured Data errors says:

    Missing required field “entry-title”.
    Missing required field “updated”.
    Missing required hCard “author”.

    What would you suggest to fix (I presume I need do what you did since you also have Genesis -j ust want to double check with you as things and fixes since you did this post April maybe now be different?)

    and why do I need to authorship for pages as static site since it is not a blog yet?

    Would these above errors stop my pages from actually being seen by google ?

    Doing the site:wwwMyDomainName.com in google search box finds and see all my pages -Pus webmaster tools ‘Fetch as google’ finds these pages and complete them ok by the way and no crawl errors in 90 days also!

    your thoughts on what I have said would be helpful !

    many thanks
    Jenny

    • Jenny,

      It is not recommended that you add authorship to static pages. These normally serve as generic info pages about your site or service. So I wouldn’t worry too much about errors on those pages. If you want to be associated with a body of content, my suggestion would be to include any of your ‘real’ content in blog post types from now on.

      Once you’ve done that, then you can start worrying about Structured Data Errors. :)

      Cheers,
      Alicia
      PS: Google will still ‘see’ your pages, especially if you’ve submitted your sitemap. But it might not display all relevant information concerning your article, such as the author, or the date you last updated your article in the search results.

  2. many thanks Alicia educating me good of you to reply. So great no worries then… wish they would make things clearer about Static pages then!

Leave a Reply