WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » [Resolved] [Plugin: WordPress SEO by Yoast] Open Graph locale

[Resolved] [Plugin: WordPress SEO by Yoast] Open Graph locale

  • 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";

    http://wordpress.org/extend/plugins/wordpress-seo/

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