Google Search Console reported a bunch of structured data errors in a new WordPress blog I began recently. This was a surprise, because I didn't know I was offering structured data. The WordPress theme I've been using, Twenty Twelve, includes CSS styles in blog posts to support the hAtom microformat, which helps search engines recognize the components of a blog post such as the title, author and tags.

When Google crawled the blog, the Structured Data section of Search Console flagged 20 pages with the error "missing: updated," which indicated the data should have an element called updated that isn't there.

Screen shot of Structured Data report in Google Search Console

I did some digging and found that WordPress bloggers are solving this problem in some complicated ways, like adding a plugin just to filter the structured data out. But I found an easier solution.

The updated style indicates when a blog post was last updated. In every page that displays a blog entry, updated should be in the HTML where the post time is displayed. Here's an example prior to the fix:

<time class="entry-date" datetime="2016-04-02T19:39:49+00:00">April 2, 2016</time></a>

Any blog post can include hAtom structured data by adding class names to the tags that surround an element. The updated class should be added to the time tag, turning the HTML into this:

<time class="entry-date updated" datetime="2016-04-02T19:39:49+00:00">April 2, 2016</time></a>

In the folder for my blog's theme, I found the file I needed to edit to add this fix: functions.php. This file is a collection of PHP functions to enhance the theme and modify WordPress functionality.

In a function called twentytwelve_entry_meta(), I found the line where the blog post's time is displayed. I edited the line to add the reference to updated. Here's the line after the change:

$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date updated" datetime="%3$s">%4$s</time></a>', esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )

I'm still learning about WordPress and not ready to make major changes to a theme's PHP code, but this fix is a minor adjustment to the HTML output, so I thought it would be safe to attempt. The fix was successful: When I test my blog's pages in Google's Structured Data Testing Tool they pass.

The fix I've described works in the Twenty Twelve theme -- and probably some of the other basic themes for WordPress. Because each theme has different HTML, you may find the code that displays the time someplace else.

-- Rogers Cadenhead




Thanks for sharing these informative blog on transformers....


I did some digging and found that WordPress bloggers are solving this problem in some complicated ways, like adding a plugin just to filter the structured data out. But I found an easier solution.



QuickBooks Pro Support has a team of experts who helps you in fixing bugs. You just need to dial QuickBooks Pro Support Phone Number to fix all such issues.


QuickBooks Enterprise Support is an immediate support team which helps in eradicating the errors revolving the QuickBooks Enterprise.


If you are looking for trustworthy technical assistance, call us on our tollfree QuickBooks Support Phone Number +1-844-232-O2O2. All the technicians offer optimum solutions for all issues and queries, our support team and service are effective, efficient and available 24 x7 hours and 365 days a year.visit us:-https://www.sortsoln.com/


www.yeezys.me.uk Yeezy
Yeezy UK www.yeezys.me.uk


www.yeezy380.us Yeezy
Ugg Boots www.uggs-officialsite.org


Finally Got the link to watch movies


www.mlbshop.us.com MLB Shop
MLB Jerseys www.mlbjerseys.us.com


www.yeezy-shoes.in.net Yeezy
Human Race Shoes www.humanracesshoes.us


www.nikefactory.us.com Nike Factory Outlet
Travis Scott jordan 1 www.travisscottjordan1.us.com


www.yeezy380.us.com Yeezy Boost 380
Nike Outlet Store www.nike--outlet.us


www.nikeoutletstoreonlineshopping.us Nike Outlet
Nike Outlet Store www.nikeoutletstoreonlineshopping.us


www.yeezy350.org.uk Yeezy UK
Yeezy www.yeezy350.org.uk


www.yeezyboost350.us.com Yeezy Boost 350
Cheap NFL Jerseys www.nfl-jerseys.us.org


www.mlbshop.us.com Cheap MLB Jerseys
Yeezy www.yeezy.com.co


www.mlbshop.us.com Cheap MLB Jerseys
Nike Outlet Store www.nikeoutletonlineshopping.us


Add a Comment

These HTML tags are permitted: p, b, i, a, and blockquote. A comment may not include more than three links. Participants in this discussion should note the site's moderation policy.