Question about Open Graph tag

#4398
  • Resolved Md
    Rank Math free

    Hi,

    I’m using a social share plugin and it wants me to turn off my Open graph tags so that I can use their open graph tags. Where would I turn this off in Rank Math?

    Thanks!

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

    Thank you for contacting Rank Math today.

    You can turn this off by adding the following PHP code to your theme’s functions.php file:

    /**
     * Hook to remove og:tags
     */
    add_action( 'rank_math/head', function() {
    	remove_all_actions( 'rank_math/opengraph/facebook' );
    	remove_all_actions( 'rank_math/opengraph/twitter' );
    });

    I hope this info helps. Thank you.

    ​​​​​​

    Md
    Rank Math free

    Sorry, what area of my functions.php file do I add this to?

    Thanks

    Todd
    Rank Math free

    Hello Md,

    You can add it at the very end.

    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 ‘Question about Open Graph tag’ is closed to new replies.