• How to resolve the problem of W3C in HTML5 for the rel attribute?

    the_category give to me the rel=”category tag” instead of one correct, for example rel=”category-rel”.

    The problem is the whitespace in the rel attribute.
    Have found any solution for that?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same issue here. Do we have to update the get_the_category_list() function by ourselves or is there a way to tell wordpress to generate HTML5 compliant code outputs ?

    I fixed it by adding this to my functions.php file:

    /add_filter( 'the_category', 'replace_cat_tag' );
    
    function replace_cat_tag ( $text ) {
    $text = str_replace('rel="category tag"', 'rel="tag"', $text); return $text;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error validation W3C HTML5 the_category rel attribute’ is closed to new replies.