Created
August 13, 2019 10:31
-
-
Save sybrew/3acf03010e85f80c902c92645c3d1294 to your computer and use it in GitHub Desktop.
Disable Pinterest Rich Pins for your WordPress site.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Disable Pinterest rich pins. | |
* Description: This plugin adds a meta tag to your site header that tells Pinterest to disable rich pins for your WordPress site. | |
* Version: 1.0.0 | |
* Author: Sybre Waaijer | |
* Author URI: https://theseoframework.com/ | |
* License: GPLv3 | |
*/ | |
/** | |
* Adds a meta tag to the header that tells Pinterest not to use | |
* structured data. | |
*/ | |
add_action( 'wp_head', function() { | |
echo '<meta name="pinterest-rich-pin" content="false" />'; | |
} ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment