og:locale not updating

#1020881
  • Resolved Jimmy Kyle
    Rank Math free

    rankmath is displaying my “og:locale” content=”en_US”

    But it should be set to en_AU as per my my language setting here:
    WordPress Dashboard → Settings → General → Site Language dropdown → English (Australia).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    You can try to use the following filter on your website to change the og:locale.

    add_filter( "rank_math/opengraph/facebook/og_locale", function( $content ) {
        $content = 'en_AU';
        return $content;
    });
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    That has worked – thanks a lot!

    Jimmy

    Hello,

    We are glad to know that this issue has been resolved. Thank you for letting us know.

    This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

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

The ticket ‘og:locale not updating’ is closed to new replies.