Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Publicize not generating 'twitter:domain' tag

  • I have Publicize activated in my Jetpack install, and it’s properly generating all Twitter Cards tags except for twitter:domain. Is there something I need to set up for this to work, or does Publicize simply not support the twitter:domain tag? If it doesn’t, that should be added.

    https://wordpress.org/plugins/jetpack/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brandon Kraft

    (@kraftbj)

    Code Wrangler

    Out of the box, we don’t add a twitter:domain tag. We haven’t reviewed the decision in awhile, but at the time, since Twitter’s validator says it isn’t required and the value would be determined by the URL, we opted not to include it.

    You can manually add it adding this either to your theme’s functions.php file or a core functionality plugin:

    function bk_twitter_domain( $tags ) {
        $tags['twitter:domain'] = esc_attr( 'INSERT TAG VALUE HERE' );
        return $tags;
    }
    add_filter( 'jetpack_open_graph_tags', 'bk_twitter_domain' );

    Cheers!

    Thread Starter Christiaan Conover

    (@cconover)

    Ah ok, thanks for the info!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Publicize not generating 'twitter:domain' tag’ is closed to new replies.