Mobile app version of vmapp.org
Login or Join
Heady270

: Time element in WordPress site not in format required by HTML5 I'm trying to display blog posts using the BlogPosting schema, but I am having difficulty getting the date to display in an acceptable

@Heady270

Posted in: #DateFormat #Html5 #Wordpress

I'm trying to display blog posts using the BlogPosting schema, but I am having difficulty getting the date to display in an acceptable format.

Currently, the responsive_child_post_meta_data() function contains the following:

<time itemprop="datePublished">%2$s</time>


But when I try to validate the results using the W3C HTML Validator, I get the following error message:


Error: The text content of element time was not in the required format: The literal did not satisfy the time-datetime format. Syntax of time-datetime: One of the following: month, date, yearless date, time, local date and time, time-zone offset, global date and time, week, non-negative integer, or duration. For more information and examples, see the section on the datetime value in the HTML specification.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

I was able to fix this by changing the date format in the Wordpress dashboard (Settings > General) to YYYY-MM-DD

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme