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

  1. hmaesta
    Posted 3 years ago #

    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,


  2. sdaveCL
    Posted 3 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.


  3. hmaesta
    Posted 3 years ago #

    Works fine, thank you sdaveCL!

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

  4. marcelstoer
    Posted 3 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

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

About this Topic