我的WordPress网站位于英国 . 我能够将html lang -attribute从 en-US 更改为 en-GB ,但是当我查看我的源代码时,打开图的 og:locale 属性显示为 en-US ,它是由yoast SEO插件生成的 . 有没有办法将区域设置更改为 en-GB ?
lang
en-US
en-GB
og:locale
来自the documentation:
wpseo_locale(string)允许更改opengraph集中使用的语言环境(以及稍后可能在其他位置) .
这是a specific example其他人如何在functions.php中解决它:
add_filter('wpseo_locale', 'override_og_locale'); function override_og_locale($locale) { return "en_GB"; }
1 回答
来自the documentation:
这是a specific example其他人如何在functions.php中解决它: