Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author weblizar

    (@weblizar)

    Hello Christiane,

    Thanks for using our plugin.
    As you know we are using core Pinterest API for this plugin. In behalf of pin it button API we are not able to customize or edit Pinterest Code API. Sorry but we are not able to provide you this feature(remove the Pin-it-Button from one single picture).

    Thanks

    Christiane,

    Pinterest has a good solution for this that I just implemented on an image on my own site. It requires adding a tiny bit of HTML code to your image tag:

    nopin="nopin"

    So say for instance you have an image in a post. You would go into the ‘Text’ view for that post, find the <img src="/imagelocation" ... /> code, and insert the code I provided above into that. The resulting code should look like this: <img class=" size-thumbnail wp-image-134 alignnone" src="/imagelocation" alt="Alt Tag" width="150" height="150" nopin="nopin" />

    Hope this helps!

    Plugin Author weblizar

    (@weblizar)

    Really thanks for posting a perfect solution for excluding an image to pin it.

    Thanks
    Alex

    Thread Starter leckeresinvegan.de

    (@leckeresinvegande)

    Great! Thank you very much! ??

    This is the solution for how to exclude slider images. Thanks!

    My site has not gone live yet, so I don’t have a link to include in this post.

    I would like to remove the pin button from my logo that spans the top of the page in my Prana theme. It’s a pdf that I uploaded to my Media folder, then used for my logo. I’m not sure where to find the code to add the nopin=”nopin”.

    Thanks in advance for any help!
    Jodi

    Plugin Author weblizar

    (@weblizar)

    Hi Jodielsa,

    It should be in a file named: “custom-header.php” in your Prana theme directory.

    Find Code (around line no 6):

    <a>"><img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php bloginfo( 'name' ); ?>" /></a>

    Update code as below (add nopin=”nopin” attribute in <img> tag):

    <a>"><img nopin="nopin" src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="<?php bloginfo( 'name' ); ?>" /></a>

    I hope that will work for you.

    Thanks
    Alex

    There’s likely way cleaner ways of going about this than adding it to the head without a priority number (like queuing an external file) but for the quick and dirty, this worked for me:

    add_action('wp_head', 'no_pin_outside_of_content');
    
    function no_pin_outside_of_content() { ?>
    
         <script type="text/javascript">
    
         jQuery(document).ready(function() {
    
              jQuery("body.home * img").attr("nopin", "nopin");
         });
    
        </script>
    }

    Note: This was a site where the homepage was the main blog index; single post pages aren’t covered by body.home so they don’t receive the “nopin” attribute and still receive a button.

    Plugin Author weblizar

    (@weblizar)

    Thanks vincent for posting good code snippet.

    The plug-in is working well, thank you! I do have one question though, how can I remove the pin it button it from my avatar image? Thank you.

    Plugin Author weblizar

    (@weblizar)

    Can you share me screenshot and your site url ?

    So my site is not yet activated and as far as the screenshot it’s my photo with the red “Pin it” button next to it. So essentially the photo to the left and once you hover over it, the “Pin it” button pops up. I’ve managed to figure out how to take it out of my about pictures because of xchellerodriguez post above but I can’t figure out how to take it out of my avatar. Thanks again.

    Plugin Author weblizar

    (@weblizar)

    Is above solution not working for you?

    I couldn’t figure it out. I deactivated the plugin.

    Plugin Author weblizar

    (@weblizar)

    NO problem.

    Hope you find a new plugin which works for you.

    Thanks for using our plugin.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Remove Button from single picture’ is closed to new replies.