2
votes

I want validate my site. I have:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

And i have this problem:

http://validator.w3.org/check?uri=http%3A%2F%2Fturismo-in.it%2Fnotizie-abruzzo%2Fla-rassegna-donne-in-jazz-valorizza-la-cultura-della-musica%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3

Using Wordpress seo by Yoast i have 3 errors with the breadcrumbs. How can i validate it? Thanks in advance.

1

1 Answers

2
votes

Joost de Valk has spent a lot of effort to show that validation errors regarding its plugin can be "set aside", using common sense of course.

However I understand your concern. You can enter this code in your functions.php file to solve the problem:

add_filter ('wpseo_breadcrumb_output','mc_microdata_breadcrumb');
function mc_microdata_breadcrumb ($link_output)
{
    $link_output = preg_replace(array('#<span xmlns:v="http://rdf.data-vocabulary.org/\#">#','#<span typeof="v:Breadcrumb"><a href="(.*?)" .*?'.'>(.*?)</a></span>#','#<span typeof="v:Breadcrumb">(.*?)</span>#','# property=".*?"#','#</span>$#'), array('','<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="$1" itemprop="url"><span itemprop="title">$2</span></a></span>','<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">$1</span></span>','',''), $link_output);
    return $link_output;
}