Hello,
I apologize for the issue you are facing with the Twitter meta tags. It seems like you are trying to remove the Twitter meta tags using filters, but they are still appearing.
To completely disable the Twitter meta tags generated by Rank Math, you can use the following code snippet in your theme’s functions.php file:
function remove_twitter_meta_tags() {
remove_action( 'rank_math/opengraph/twitter/twitter_title', 'rank_math_opengraph_twitter_title' );
remove_action( 'rank_math/opengraph/twitter/twitter_description', 'rank_math_opengraph_twitter_description' );
}
add_action( 'wp_head', 'remove_twitter_meta_tags', 1 );
This code will effectively remove the Twitter title and description from the head section of your site. Make sure to clear any caching plugins you might be using after making these changes to see the effect.
If this does not resolve the issue, please reply to this ticket with your site URL so we can further investigate the problem. Thank you for raising this concern!
Sources:
Open Graph Meta Tags » Rank Math
Hello,
Thank you so much for getting in touch.
Please use the following filter codes:
add_filter( 'rank_math/opengraph/twitter_card', '__return_false' );
add_filter("rank_math/opengraph/slack/twitter_data1", "__return_false");
add_filter("rank_math/opengraph/slack/twitter_data2", "__return_false");
add_filter("rank_math/opengraph/slack/twitter_label1", "__return_false");
add_filter("rank_math/opengraph/slack/twitter_label2", "__return_false");
You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Don’t hesitate to get in touch with us if you have any other questions.
Hello,
We are glad that helped.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.