• Resolved fmonti

    (@fmonti)


    I noted that Yoast adds the
    <meta property=”og:locale” content=”en_US” /> tag to my site, since I am using WP in English. However, the site I am developing is in spanish language, therefore I would like the tag to indicate so, without having to switch the whole WP interface to spanish

    Is there a way of doing so?

    https://ww.wp.xz.cn/plugins/wordpress-seo/

Viewing 3 replies - 1 through 3 (of 3 total)
  • There is a function mentioned here which may help.

    Thread Starter fmonti

    (@fmonti)

    Thanks for pointing me that way. Adding this code to the functions.php did it:

    function yst_wpseo_change_og_locale( $locale ) {
    	return 'es_ES';
    }
    add_filter( 'wpseo_locale', 'yst_wpseo_change_og_locale' );

    Great. Happy to hear that worked out. Looks like a useful filter.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP vs page language’ is closed to new replies.