Removing ALL Open Graph And Twitter Tags

#515223
  • Resolved Oli
    Rank Math free

    I want to remove ALL Open Graph and Twitter tags, because it is unnecessary code, and is akin to stuffing keywords.
    Fact: If those tags are not present, the title, meta description and keywords tags will be used!
    How can this be accomplished?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    You can add the following hook to your WordPress site in order to remove all OpenGraph tags (og:tags) added by Rank Math on your site:

    /**
     * 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' );
    });

    Please follow the URL below to learn how you can add filters/hooks to your site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps.

    Thank 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 1 replies (of 1 total)

The ticket ‘Removing ALL Open Graph And Twitter Tags’ is closed to new replies.