WordPress.org

Forums

WordPress SEO by Yoast
REQUEST: change manually og:locale (4 posts)

  1. hmaesta
    Member
    Posted 2 years ago #

    Hello.
    My site's content is in PORTUGUESE, but I prefer using WordPress in English.

    As I use WordPress in English, the plugin recognize that the "og:locale" meta is "en_US".

    So I want to ask (in name of mostly all non-Americans bloggers) that WordPress SEO by Yoast let us choose the value of this meta (pt_Br in my case).

    Thank you,
    Hugo.

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

  2. sdaveCL
    Member
    Posted 2 years ago #

    This would be a very nice feature.

    According to another user, adding the following to your theme's functions.php does the trick:

    add_filter('wpseo_locale', 'override_og_locale');
    function override_og_locale($locale)
    {
        return "en_GB";
    }

    Of course, you would replace "en_GB" with your country code.

    http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-how-do-you-set-the-oglocale-value

  3. hmaesta
    Member
    Posted 2 years ago #

    Works fine, thank you sdaveCL!

    But a native way to do this would be better. ):

  4. marcelstoer
    Member
    Posted 2 years ago #

    I thought I suffered from the same problem. My WP installation is in English but on one site I write in German. However, "go:locale" is de_DE.

    I guess this is because I use the WordPress Language plugin. It allows me to set English for the WP admin app and German for the front end.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress SEO by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags