• 1. it would be great, if you would update robots.txt with
    Sitemap: https://www.example.tld/sitemap_index.xml
    so autodiscovery would work – i know that you are informing google and yahoo, but there are many other search engines, that should have known about sitemap
    2. there is a problem with html validation with your plugin, as you are using RDF for social and for breacrumb. It occurs with HTML5 themes, what is today’s default. It would be better to use microformats if possible.

    https://www.ads-software.com/extend/plugins/wordpress-seo/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter thomask

    (@thomask)

    Just so you do not have to write to first point:

    add_filter ('robots_txt','mc_add_sitemap_index');
    function mc_add_sitemap_index($robots) {
    $robots .= "Sitemap: " .
    home_url( '/sitemap_index.xml' );
    return $robots;
    }
    Thread Starter thomask

    (@thomask)

    and solution for breacrumb:

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

    Thread Starter thomask

    (@thomask)

    and about the problem with social opengraph – you should add
    <html version=”HTML+RDFa 1.0″>
    so

    add_filter ('language_attributes','mc_language_attributes');
    function mc_language_attributes ($output) {
    $output .= ' version="HTML+RDFa 1.0"';
    return $output;
    }

    it will probably still not validate with W3C validator as this is still experimental function, but it is valid (e.g. https://dhuny.com/188)

    but it is questionable if this should be done, many people will probably dislike the another error notice in w3c validator

    Hey thomask, this is great that you’ve looked into this. Does the breadcrumb fix validate with the w3c validator?

    Also, where would you insert the breadcrumb filter code?
    Did you add it to a specific file from the plugin or your theme itself?

    Thanks in advance,
    – Andrew

    Thread Starter thomask

    (@thomask)

    yes, it will validate (see e.g. https://validator.w3.org/check?verbose=1&uri=https://www.money.cz/money-s3/vlastnosti-systemu/) and google recognise it as breadcrumb

    you can insert it functions.php or plugin, it is up to you. I yould not put it to theme files, as you would have to put it to every theme file

    Hmmm… it actually causes more errors than the 3 pre-existing ones (5 now). The issue is the itemtype, itemprop and itemscope not being recognized attributes. I haven’t checked your facebook fix but the breadcrumbs update you listed maybe needs a little more tweaks.

    – Andrew

    Thread Starter thomask

    (@thomask)

    no, it is perfectly validate, as you can see on the validator link. Of course there may be other problems on your site – typicaly what is the html version of the page?? give here a link and i may look at it

    I’ve added your code in the class constructor function of wordpress-seo/frontend/class-breadcrumbs.php. Below is the link to the validation for the page. Let me know your thoughts.

    See the Results

    – Andrew

    Thread Starter thomask

    (@thomask)

    1. ehm. do not edit others plugins as it will make them not-updatable
    2. you are using XHTML 1.0 Transitional, actualy i do not know if it is possible to use microformats wíth xhtml and what you have to do for it. I am using HTML5, where it perfectly validates. Try to google the errors with xhtml 1.0 transitional, sorry for not helping more.

    Hey No worries thomask. Thanks for looking into it.
    Hopefully we can all find a solution to these little quirks.

    Take Care,
    – Andrew

    Thanks ??

    Wow, thanks a lot Thomas, breadcrumb validation now works like a breeze ??

    Turismo in

    (@turismo-in)

    So, how to validate with XHTML 1.0?

    A little months ago there isn’t this problem with seo yoast breadcrumbs.

    jnpi

    (@jnpi)

    A response for XHTML 1.0 validation problem would be appreciated. ??

    Turismo in

    (@turismo-in)

    Also breadcrumbs has XHTML 1.0 validation problem.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] sitemap autodiscovery & validation problems’ is closed to new replies.