Code for nopin class
-
I don’t know html but am trying to add a nopin class to disable the pinit button on a single image.
I tried this, but it didn’t work.
<img class=”nopin” alt=”Pumpkin Cornbread (Hungry Couple NYC)” src=”http://futureexpat.com/wp-content/uploads/2013/11/Pumpkin-Cornbread-Hungry-Couple-NYC-1024×990.jpg” width=”490″ height=”473″ />
Can you tell me what I’m doing wrong? I currently have disabled it on the entire page since the person who has the copyright on this picture asked me to pull the Pin It button off of it.
http://wordpress.org/plugins/jquery-pin-it-button-for-images/
-
You’re welcome,
As for preventing pinning of main pages, categories, individual pages, etc – That’s where you’d need to implement the plugin that I mentioned above…
and in some cases some additional tweaking to the functions.php –
http://docs.appthemes.com/tutorials/allow-html-in-wordpress-category-taxonomy-descriptions/
and I was wondering, Is there a specific reason the disclosure is an image and isn’t just text? That would prevent it from ever being pinned… If I were you, I’d remove the hover pinit and then the nopin attribute will work.
I thought the option to prevent pinning of main pages, categories etc was in my jQuery Pin It Button For Images Options??
I disabled jQuery Pin It Button For Images. I wanted to keep it so I could put my own description into the images being pinned.
I couldn’t get the bigger “D” in the disclosure text to show up how I wanted it. I tried putting the text into a table and it just looked funny, lol so I just made an image, so it would be easier to just include it in my post.
How do I just remove the hover pinit?
I don’t want to block any images from being pinned from main pages, categories, individual pages, etc just the feature image post thumbanils.
No, they’re 2 different things… one is a BLOCK – yours is a hover pinit.
You add descriptions to individual pins by adding the title tag (I demonstrated earlier)- you don’t need a plugin to do that.
The “D” is called a drop cap – and depending on the theme you’re using, you may have that capacity already – with a short code…
Disable and remove the Jquery-pin-it-button plugin…
Last, the tutorial link I gave you, walks you through having the ability to write code into fields you wouldn’t normally be able to – thus allowing you to muck around and prevent pinning your featured image –
Since your image is embedded IN the post AND on the front page, you’re not going to be able to prevent pinning it unless you do that.
I have prevention of pinning from my main pages, categories etc – because users would pin from them and not INSIDE the post – then the rich pin attributes don’t apply and the image isn’t linked TO its post –
Otherwise, I don’t have issues with them pinning featured images.
Oh OK! I don’t know a whole lot about short codes. Slowly learning! LOL!
I also don’t want to muck around too much with the css, as I only know what I am doing from instructions I see online. I will try my best with the tutorial link you gave to figure out how to prevent the featured image 150×150 thumbnail from being pinned. Hopefully it’s not too difficult lol
I see what you are saying about preventing pinning from your main pages, categories etc. I always wondered why one would disable those. Thank you for all the information and easy to understand instructions for this newbie 🙂
If you’re not comfortable with code – don’t do it. It IS difficult.
People that build sites can help and are available for contracts big and small ツYes, you have all of the right open graph tags to have rich pins – but if they pin from the main pages – the pins won’t have their rich pin attributes –
and you’re most welcome.
I will have a look and see if I feel comfortable or not 🙂
So what should I disable from being pinned in the Pinterest Block Settings? What would you recommend?
I recommend… poking around my site and Pinterest ツ
HA! Will do! Thanks again! 🙂
I’m struggling with the same issue. I’ve installed the JQuery PinIt Button for Images plug in. The Settings for this indicate that a Class of “nopin” will disable the button.
On one specific picture, I’ve set the code:
<img class=”nopin” src=”http://healingfamilyeats.com/wp-content/uploads/2014/09/JJ-squash.jpg” alt=”Roasted Squash Soup [AIP] – Healing Family Eats” width=”6000″ height=”4000″ />The image can be seen at:
http://healingfamilyeats.com/roasted-squash-soup-with-thyme-aip/
The fifth image on this page is the one that is specially marked (immediately below “Hurrah for a winter of soup making!”It seems to be working, as no Pin It button appears on the picture. Also I’ve blocked the ability to open the jpg by double-clicking on the picture – also working.
BUT I have a Javascript function that sits in my Safari bookmarks bar (presumably obtained directly from Pinterest), called Pin It, that when called shows all Pin’able pictures from any site. Weirdly first time I run this, it shows the picture I’m trying to block, but when you try to select it Pinterest picks up a different picture(!) The problem is that if I repeat the process, second time Pinterest displays the correct picture and allows it to be pinned. So we’re not blocking the picture from being pinned after all. Any ideas?
healingfamilyeats,
First I can only suggest that you read this thread – since I already corrected how the no pin should be coded (at the very beginning of this thread) and there is NO class in it …
Second, I can’t imagine why you would have so many images that are 6000 pixels wide on your page. That is ENORMOUS – they’re print resolutions that bog your site down tremendously in page load time and speed. They don’t have to be that big for any reason unless you have a drive in, in your backyard, and people come to watch the posts on the movie screen 😉
3rd, I dont know what “no pin it button’ you’re referring to – but I can tell you this – when you have a website you have to understand that your audience is viewing it from more than one browser and more than one kind of platform – Laptops, desktops, phones – AND Browsers= Chrome, Firefox, Safari, Opera, Internet Explorer etc – EACH of them have “pinterest extensions” that don’t require or care if there is a pin it button on your site or not –
You do NOT need a JQuery anything – and if you don’t know what you’re doing with it, I can only suggest that you probably shouldn’t be installing it.
It isn’t necessary – it bloats your site more – it opens you to be vulnerable to people who will try to exploit your site thru JQuery etc etcYou can get a pinterest button FROM Pinterest – and you can add the no pin code – to the image you don’t want to be pinned.
You could also try this plugin, its popular and safe – the developer is quite thorough, its simple and easy to use…
https://wordpress.org/plugins/pinterest-pin-it-button/Good luck!
PS: You also have your pinit button set to pin a SPECIFIED image – but if I click my browser pin it – I can access every image on the page.
The topic ‘Code for nopin class’ is closed to new replies.