Hello,
Thank you for contacting Rank Math.
You can use the following filter to remove the og tags:
add_action( 'rank_math/head', function() {
remove_all_actions( 'rank_math/opengraph/facebook' );
});
Here is a guide you can follow to add the filter:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps.
Thank you.
Thanks, Anas for the quick response.
I have used the code provided by you and as well as this one to remove further remove Twitter OG as well, however, I am still seeing references to Twitter code on my website.
Can you please take a look and point me in a direction?
remove_all_actions( 'rank_math/opengraph/twitter' );
<meta name="twitter:label1" content="Written by" />
<meta name="twitter:data1" content="admin admin" />
<meta name="twitter:label2" content="Time to read" />
<meta name="twitter:data2" content="Less than a minute" />
Hello,
Please add this in the filter:
remove_all_actions( 'rank_math/opengraph/slack' );
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.