Skip to content

Instantly share code, notes, and snippets.

@jeherve
Last active July 3, 2019 09:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeherve/9087431 to your computer and use it in GitHub Desktop.
Save jeherve/9087431 to your computer and use it in GitHub Desktop.
[Jetpack] Deactivate Twitter Cards and / or Open Graph Meta tags.
<?php
/*
* Plugin Name: Disable Jetpack Open Graph tags and Twitter Cards
* Plugin URI: http://wordpress.org/extend/plugins/jetpack/
* Description: Disables Jetpack Open Graph tags
* Author: Jeremy Herve
* Version: 1.0
* Author URI: http://jeremyherve.com
* License: GPL2+
*/
// Disable both Twitter Cards and OG tags
add_filter( 'jetpack_enable_open_graph', '__return_false', 99 );
// Disable only the Twitter Cards
add_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment