Skip to content

Instantly share code, notes, and snippets.

@sybrew
Created August 13, 2019 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sybrew/3acf03010e85f80c902c92645c3d1294 to your computer and use it in GitHub Desktop.
Save sybrew/3acf03010e85f80c902c92645c3d1294 to your computer and use it in GitHub Desktop.
Disable Pinterest Rich Pins for your WordPress site.
<?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