The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[Plugin: WordPress SEO by Yoast] Adding opengraph meta data makes header W3C Inv (2 posts)

  1. Justin Gilpin
    Posted 3 years ago #

    get_locale() never appears to get the correct information. I'm trying to w3 validate and this plugin has been a great tool, but I'm not sure how to hard code the plugin to fix this issue.

    Line 12, Column 16: there is no attribute "property"
    <meta property='og:locale' content='en_US'/>

    the og:locale isn't pulling up any data. How would I get this to pull up the correct date? I've heard from one person that it comes from wp_config file. But with no explanation. I'm will to hack the plugin to validate it, though I don't know any php.

    Plugin Editor> WordPress SEO > File:wordpress-seo/admin/class-metabox.php

    <script type="text/javascript">
    var wpseo_lang = '<?php echo substr( get_locale(), 0, 2 ); ?>';
    var wpseo_meta_desc_length = '<?php echo $this->meta_length; ?>';
    var wpseo_title_template = '<?php echo esc_attr( $title_template ); ?>';
    var wpseo_metadesc_templatee = '<?php echo esc_attr( $metadesc_template ); ?>';
    var wpseo_permalink_template = '<?php echo $sample_permalink; ?>';
    var wpseo_keyword_suggest_nonce = '<?php echo wp_create_nonce( 'wpseo-get-suggest' ); ?>';

    How can I edit this code to just pull up property='en_US' ?? Thanks in advanced for the help :)

  2. Henry
    Posted 3 years ago #

    This may be a touch late but


    around line 185 you'll see:

    echo "<meta property='og:locale' content='" . esc_attr( $locale ) . "'/>\n";

Topic Closed

This topic has been closed to new replies.

About this Topic