Change the og:locale tag

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

    Thank you for contacting Rank Math today.

    This is actually available. You can use the following code in your functions.php file:

    /**
     * Allow developers to change the content of specific social meta tags.
     *
     * The dynamic part of the hook name. $network, is the network slug
     * and $og_property, is the property which we are outputting.
     *
     * @param string $content The content of the property.
     */
    add_filter( "rank_math/opengraph/facebook/og_locale", function( $content ) {
            $content = 'nl_NL';
    	return $content;
    });
    

    Looking forward to helping you. Thank you.

    ​​​​​​

    sven
    Rank Math free

    thanks

    Todd
    Rank Math free

    Hello Sven,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Change the og:locale tag’ is closed to new replies.