Hello,
I apologize for the inconvenience you are facing. To disable the Open Graph output in Rank Math, you can follow these steps:
- Navigate to your WordPress Dashboard.
- Go to Appearance and then click on Theme File Editor.
- Add the following code snippet to your theme’s
rank-math.php
file:
/**
* Function to disable Open Graph output by Rank Math
*/
add_filter( 'rank_math/opengraph/facebook', '__return_false' );
add_filter( 'rank_math/opengraph/twitter', '__return_false' );
- Save the changes by clicking the Update File button.
By adding this code snippet, you will disable the Open Graph output generated by Rank Math, preventing any conflicting information from being sent to social media platforms.
If you need further assistance or have any other questions, feel free to ask.
Thank you for reaching out and raising this concern.
Sources:
How to Disable All Rank Math Generated SEO Tags » Rank Math
Open Graph Meta Tags » Rank Math
Open Graph/Social Preview Image Is Not Displayed » Rank Math
Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
You can add the following filter on your website to disable Rank Math OG meta tags:
add_action( 'rank_math/head', function() {
remove_all_actions( 'rank_math/opengraph/facebook' );
remove_all_actions( 'rank_math/opengraph/twitter' );
});
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps and please don’t hesitate to let us know if you have any other questions.
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.