wp_get_archives breakes Html5 validation

I have a issue with wp_get_archives because it breaks my Html5 validation.

Inside validator I get this message: Bad value archives for attribute rel on element link: Not an absolute IRI. The string archives is not a registered keyword or absolute URL.
My archive links looks like this:
http://robertpeic.com/wordpress_template/2013/01/’ />

http://robertpeic.com/wordpress_template/2012/12/’ />

I am guessing that those errors are happening because spaces inside my links, now if I change my Doctype into Strict my page validates fine.
Can someone please tell me how can I validate my page as HTML5? Thank you!!

My wp_get_archives looks like this:wp_get_archives('type=monthly&format=link');
Validator link

1 Answer
1

I would just remove the wp_get_archives() call from the document head altogether. Why even have it there?

Otherwise, this isn’t really WordPress-specific. rel="archives" is valid for <link> tags in HTML5.

Leave a Comment