• Resolved kmcminn

    (@kmcminn)


    Hello.

    I’m currently trying to set Twitter Cards up and I noticed that Jetpack has already added the following meta to my header? At least, it looks that way. I already have my own code, so how do I get rid of this?

    <meta name="twitter:site" content="@jetpack" />
    <meta name="twitter:image" content="https://cdn.nintendonews.com/wp-content/uploads/2013/12/nes_remix_01.jpg?w=240" />
    <meta name="twitter:card" content="summary" /><style type="text/css" media="print">#wpadminbar{display:none}</style><style type="text/css" media="screen">html{margin-top:32px !important}* html
    body{margin-top:32px !important}@media screen and ( max-width: 782px ){html{margin-top:46px !important}* html
    body{margin-top:46px !important}}</style>

    https://www.ads-software.com/plugins/jetpack/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Jetpack does indeed add Twitter cards to your site’s head, unless you already use another Twitter Card plugin.

    To remove the cards manually, you can add the following filter to a functionality plugin or to your theme’s functions.php file:

    add_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );

    Thread Starter kmcminn

    (@kmcminn)

    Hello, Jeremy. I’ve cleared this up by installing a Twitter Cards plugin. After in installed the plugin, the Jetpack meta disappeared. Thanks kindly for your timely response!

    I do have one question on that, however. How did the Jetpack meta disappear once I installed the Twitter Card plugin? I guess what I’m asking is what plugin is telling the other plugin to stop using the specific Twitter Card meta?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    How did the Jetpack meta disappear once I installed the Twitter Card plugin? I guess what I’m asking is what plugin is telling the other plugin to stop using the specific Twitter Card meta?

    We check for other Twitter Card plugins in Jetpack, and try to deactivate our Twitter Cards if you already use another plugin. You can see the function here:
    https://github.com/Automattic/jetpack/blob/2.7/class.jetpack.php#L633

    Thread Starter kmcminn

    (@kmcminn)

    Very neat! Thanks for the explanation, Jeremy! Keep up the great work, man!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twitter Cards’ is closed to new replies.