Block Pinterest From Pinning Your Images in WordPress

This WordPress function, "no_images_pinning," effectively blocks Pinterest from pinning your images by adding a custom meta tag to the website's head section.

Block Pinterest From Pinning Your Images in WordPress
Photo by Fikret tozak / Unsplash

This WordPress function, "no_images_pinning," effectively blocks Pinterest from pinning your images by adding a custom meta tag to the website's head section.

// Block Pinterest From Pinning Your Images
function no_images_pinning() {
    echo '<meta name="pinterest" content="nopin" />';
}
add_action( 'wp_head', 'no_images_pinning' );