Dec 13, 2020 8:22 pm
Is there a way to add data-pin-nopin="nopin" to the images attached with comments? This is so the images are not "pin(able)" to Pinterest and don't show the 'save to Pinterest' button.
If there's a function I can add to my genesis theme or the plugin settings please let me know.
Thank you.
2 Replies
Dec 14, 2020 9:58 am
Use this code:
add_filter('wpdiscuz_after_read_more', function ($content) {
return preg_replace('~(<img)([^>]+>)~is', '$1 data-pin-nopin="nopin"$2', $content);
}, 99999999);
Put this code in the WordPress active theme functions.php file (more information on how to add insert custom code).
Dec 14, 2020 6:31 pm
perfect, thanks so much!!