-
Hi! I have a Woo shop with products, where I only want the price to be displayed (and found) in the DOM when people are logged in. So prices should not be availiable when you’re not logged in.
I can see that Rank Math uses some data from Woo to create:
<meta name="twitter:label1" content="Price">
<meta name="twitter:data1" content="DKK44,00">
If I disable Rank Math, this Twitter meta data will disapear.So I tried:
/**
* Allow changing the Twitter Card type as output in the Twitter card.
*
* @param string $type
*/
add_filter( 'rank_math/opengraph/twitter/card_type', function( $type ) {
return $type;
});
and
/**
* Hook to remove og:tags
*/
add_action( 'rank_math/head', function() {
remove_all_actions( 'rank_math/opengraph/twitter' );
});This remove all twitter related stuff, except the twitter:label1 and twitter:data1 (which contains the price).
How can I stop rank math from outputting this data?
Thanks! 🙂
The ticket ‘Remove twitter:data1 and twitter:label1’ is closed to new replies.