og:locale

#86716
  • Hi,
    my og locale is set to ¨es_ES¨- My site is in spanish but it’s global, not for Spain only.
    Under wordpress settings – general- I have ¨spanish¨ (without a country) so I want the og locale to just be ¨es¨
    How can I do this?

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

    Thank you for contacting Rank Math today.

    You can use the following code in your theme 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 = 'es_ES';
    	return $content;>
    
    });
    

    Please note tat locale opengraph is normally used by Facebook not Google, so this doesn’t affect your Search Engine appearance

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    Thank you!
    Actually, maybe you can help me i opened this ticket a couple of days ago and didn’t get an answer and haven’t gotten it fixed, could you please take a look?

    https://support.rankmath.com/ticket/sitemap-not-adding-pages/

    Hello,

    I noticed there has been a reply already in your sitemap thread.

    Do you have any further question(s) on this topic?

    If you do, please let us know and we will be glad to assist you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

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