Remove twitter:data1 and twitter:label1

#323775
  • Resolved Jesper Holst
    Rank Math free

    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! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thanks for contacting us and sorry for any inconvenience that might have been caused due to that.

    The twitter:label and twitter:data tags are required for Slack sharing integration. If want to remove them then please disable the Slack Enhanced Sharing option from WP Dashboard > Rank Math > Titles & Meta > Post Types.

    Hope this helps. Let us know if you need any other assistance.

    Works wonders! Thanks, Jaideep.

    Hello,

    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.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Remove twitter:data1 and twitter:label1’ is closed to new replies.