WordPress Bad value category tag for attribute rel on element a

WordPress Bad value category tag for attribute rel on element a

Already a Member? Log In to Your Account

WordPress Bad value category tag for attribute rel on element a

WordPress Bad value category tag for attribute rel on element a

The W3C Validator showing you this error in? WordPress Bad value category tag for attribute rel on element a The string category is not a registered keyword or absolute URL. Whitespace in path component. Use %20 in place of spaces.

For whatever reason they didn’t fix this yet, since i still got this error on the latest WordPress 3.5 release.

There is a little workaround for this by editing file wp-includes/category-template.php

This is exactly what we are doing now:

Goto line 163 in your category template (wp-includes/category-template.php) file:

$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="category tag"' : 'rel="category"';

and remove the category include whitespace, so that the line looks like this now:

$rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? 'rel="tag"' : 'rel="category"';


We have now a W3 conform rel value in our code and the error should be gone.

Remember: Every time you update your Blog to a newer Revision you have to redo this step again, since the file is getting overwritten.

 

Check out my Website at: http://ispire.me for more How-To's and IT-related solutions.

My Website is containing following Content: IT Howto, tech secrets, tech helpful hints, openstack, freebsd, debian, smartos, illumos, solaris, windows, kvm, libvirt, pfsense, zfs, nginx, haproxy, varnish, nexentastor e.g.

  Article Info
Created: Jan 5 2013 at 08:29:30 AM
Updated: Jan 5 2013 at 08:31:05 AM
Category: Web-2.0
Language: English

  Share
Stumbleupon
Digg
Delicious
Reddit
© 2006-2014 OnToplist.com, All Rights Reserved