add "updated" to hNews microformat to support Google structured data #948

Closed
wants to merge 1 commit into
from

Projects

None yet

6 participants

@kevinlisota

Google's structured data testing tool requires that hentry items are
tagged with an "updated time". This fix will remove the "missing
required field updated" error in Webmaster Tools and the Structured Data
Testing Tool

@kevinlisota kevinlisota add "updated" to byline microformat to support Google structured data
Google's structured data testing tool requires that hentry items are
tagged with an "updated time". This fix will remove the "missing
required field updated" error in Webmaster Tools and the Structured Data
Testing Tool
369b8a6
@Foxaii
Member
Foxaii commented Dec 21, 2013

The date the post was published, could be different from the date the post was updated. So I'm not sure if we should be combining the two together by default.

Thanks for raising it though as it's worth further investigation.

@kevinlisota

True. Setting the both to the same time is a pretty common solution to this microformat error in the WP community. Whether it is technically correct or not is another matter. I could be convinced that the vast majority of WP post are never modified after publish, making it irrelevant. I also think that having both times visible to the reader is meaningless and repetitive in most contexts.

That said, I implemented this differently on my own site to make the two times correct. I've hidden the updated time using the Bootstrap hidden class, since it didn't make sense to show it to the reader.

<time class="published" datetime="<?php echo get_the_time('c'); ?>"><?php echo get_the_date(); ?></time>
<time class="updated hidden" datetime="<?php echo get_the_modified_time('c');?>"><?php echo get_the_modified_date()?></time>
@Foxaii
Member
Foxaii commented Dec 21, 2013

Displaying both dates as a string is a definite no. Having a "Last edited %n days ago" string with the updated class was my initial thought.

@toddsantoro

@kevinlisota This is exactly what I did and it fixed my WebMaster Tools errors. This is why I love the Roots Framework because it is so cutting edge.

@webdesignphilippines

I'm tempted to hide 'updated' in an itemprop meta. It becomes invisible to human eyes only. I got it to work but took it out again. Is this legit or would i get penalized by google?

@retlehs
Member
retlehs commented Jan 29, 2014

i tweeted readability about this and they said they'd reply on my gist, still waiting for a reply

@retlehs retlehs added the on hold label Feb 5, 2014
@retlehs
Member
retlehs commented Aug 7, 2014

probably safe to say that they're not gonna give any input. i've tweeted em once or twice after the first one and so did @JulienMelissas

@JulienMelissas
Member

Yep I was trying to help get some old issues closed.

@retlehs
Member
retlehs commented Oct 21, 2014

closed by 08104ea

@retlehs retlehs closed this Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment