Title: pubdate validation issue
Last modified: August 20, 2016

---

# pubdate validation issue

 *  Resolved [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/)
 * On [Swanson Heritage](http://swansonheritage.com/) (and 2 others also), I am 
   having an HTML5 validation issue ([http://validator.w3.org/](http://validator.w3.org/))
 * The generated code in question is:
 *     ```
       <time class="entry-date" pubdate="" datetime="2012-07-07T13:04:42+00:00">
       ```
   
 * And the validation error is:
 * > Attribute pubdate not allowed on element time at this point
 * As you can see ‘pubdate’ is blank anyway (should it be??).
 * I have looked on here for this issue and found nothing of use…looked online and
   found a few links stating that this is actually an error by the validator…
 * So, as I am trying to get these sites to validate, does anyone have a quick fix
   to apply to my twentyeleven child themes?
 * I assume I can include a custom functions.php file, de-register some function,
   and add the modified one back in but I am not sure which one or if I may break
   something in doing so…

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885032)
 * Mod can feel free to change title to ‘pubdate’
 *  Thread Starter [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885384)
 * OK – Bump to OTTO online now 🙂
 *  [Rachel Baker](https://wordpress.org/support/users/rachelbaker/)
 * (@rachelbaker)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885385)
 * Actually the code that is generated by TwentyEleven is:
 * `<time class="entry-date" datetime="2012-07-04T23:02:20+00:00" pubdate>July 4,
   2012</time>`
 * pubdate was removed from the W3C HTML5 spec, and it’s future is in doubt.
    More
   on this: [http://www.brucelawson.co.uk/2012/best-of-time/](http://www.brucelawson.co.uk/2012/best-of-time/)
   and [http://html5doctor.com/time-and-data-element/](http://html5doctor.com/time-and-data-element/)
 * You can remove the pubdate text from the function in TwentyEleven, this is function
   you want to edit: [http://pastebin.com/W4mGHfTg](http://pastebin.com/W4mGHfTg)
 *  Thread Starter [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885386)
 * > I assume I can include a custom functions.php file, de-register some function,
   > and add the modified one back in but I am not sure which one or if I may break
   > something in doing so…
 *  [Rachel Baker](https://wordpress.org/support/users/rachelbaker/)
 * (@rachelbaker)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885387)
 * You can include this snippet: [http://pastebin.com/jQGi6CsJ](http://pastebin.com/jQGi6CsJ)
   in your child theme’s functions.php and it will override the same function in
   the TwentyEleven parent theme. I added some comments around the function to help
   you understand why the snippet works.
 * More on Child Themes and functions.php files: [http://codex.wordpress.org/Child_Themes#Using_functions.php](http://codex.wordpress.org/Child_Themes#Using_functions.php)
 *  Thread Starter [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885391)
 * [@rachelbaker](https://wordpress.org/support/users/rachelbaker/),
 * Thank you for the snippet…worked great…one other vaildation issue still on posts
   related to [this lengthy post and discussion](http://wordpress.org/support/topic/wordpress-abuses-rel-tag?replies=30)
   re: rel=”category tag”
 * I tried to copy the function to my child theme’s functions.php file and edit 
   rel=”category tag” to rel=”tag” as applicable (and noted in the linked to post),
   but received an error message…do I need to create my own function or how does
   one override a function from core (and not a theme)?
 * I did edit the core file wp-includes/category-template.php to test (on one site)
   and the homepage does now validate to HTML5 (again thanks for your snippet), 
   but I would prefer not to edit core files….any thoughts?
 *  Thread Starter [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885411)
 * Last response now moved to new post – initial post resolved.
 *  [Gazeta1277](https://wordpress.org/support/users/gazeta1277/)
 * (@gazeta1277)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885485)
 * > You can remove the pubdate text from the function in TwentyEleven, this is 
   > function you want to edit: [http://pastebin.com/W4mGHfTg](http://pastebin.com/W4mGHfTg)
 * Would you, please, say a little bit more on how to edit – for novice users. Which
   lines from which file should we delete or modify. Or you reccommend to delete
   the whole text shown in your link?
 * It is interesting that so many standard themes from basic cms can not pass w3c
   markup validation…
 *  [roadRUNN3R](https://wordpress.org/support/users/roadrunn3r/)
 * (@roadrunn3r)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885508)
 * > [http://pastebin.com/W4mGHfTg](http://pastebin.com/W4mGHfTg)
 * If you’re editing your theme’s functions.php, search for `pubdate` and delete
   it.
 * > [http://pastebin.com/jQGi6CsJ](http://pastebin.com/jQGi6CsJ)
 * If you’re working in your child theme’s functions.php, copy lines 9-19 from this
   snippet.
 * Btw, you can use tools like [http://www.diffnow.com/](http://www.diffnow.com/)
   to search for differences in code and as Rachel said above:
 * > More on Child Themes and functions.php files: [http://codex.wordpress.org/Child_Themes#Using_functions.php](http://codex.wordpress.org/Child_Themes#Using_functions.php)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘pubdate validation issue’ is closed to new replies.

## Tags

 * [html5](https://wordpress.org/support/topic-tag/html5/)
 * [pubdate](https://wordpress.org/support/topic-tag/pubdate/)
 * [validator](https://wordpress.org/support/topic-tag/validator/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [roadRUNN3R](https://wordpress.org/support/users/roadrunn3r/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/pupdate-validation-issue/#post-2885508)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
