Delete sitename and separator for OG tags

#75691
  • Resolved Aleš Sýkora
    Rank Math free

    Hi,

    is it possible to change the default structure of TITLE for social sites?

    I have this title as default:

    Title Separator Sitename – Jak zíksat dotaci na dešťovku | Vodarium

    I want to display only Title on social media tags:

    Title – Jak získat dotaci na dešťovku

    How can I achieve this with rankmath? Thanks for advice.

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

    Thank you for contacting Rank Math today.

    You can modify the social sharing title on the page by going to Rank math meta box under the social tab.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi, thank you for the answer. Is there a site-wide solution?

    Hello,

    For that you can customize the following filter and add it to your them 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/{$network}/$og_property", function( $content ) {
    	return $content;
    });

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

    How customize?

    Alberto
    Rank Math business

    Hello,

    You would need to know about coding since it is an advanced filter (or hire a freelancer to do it for you).

    In any case, meanwhile we can’t provide custom code (due to being a small team), if you (or a freelancer you hire) have questions about particular things in the code, we will be more than happy to help you.

    Looking forward to help 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 5 replies - 1 through 5 (of 5 total)

The ticket ‘Delete sitename and separator for OG tags’ is closed to new replies.