• Resolved nautilus7

    (@nautilus7)


    Hi, as far I understand open graph needs a lower case code for locale such as “en_us” or “el_gr” etc. WordPress uses a slightly different version like “en_US” with capital letters. That throws a warning in facebook debugger.

    Simply adding a php function to make all country codes lower cases should fix the issue:

    echo "<meta property='og:locale' content='".esc_attr( apply_filters( 'wpseo_locale', strtolower( get_locale() ) ) )."'/>\n";

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

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Open Graph locale’ is closed to new replies.