WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Open Graph locale (3 posts)

  1. nautilus7
    Member
    Posted 2 years ago #

    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/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Good point! Finally understand the weird notice FB gives about those things. Will be fixed in 1.1.7

  3. nautilus7
    Member
    Posted 2 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.