Typepad Master Class: Add a Pinterest hover image
March 27, 2013
Welcome to the Typepad Master Class! If you've ever wanted to delve into more advanced trickery with your blog's design, the Master Class is for you. Topics covered in this series are for the adventurous or advanced blogger, so an intermediate to advanced level of knowledge of HTML and CSS will come in handy. Additionally, these guides will often require Custom CSS or Advanced Templates, so a Pro Unlimited account is necessary to access those areas and achieve the look and effects we cover. Interested in upgrading? Just head over to the Account link in your Dashboard and click on Billing Info to get started.
Typepad's default Pin It button is a great way for you and your readers to add your images to Pinterest. But lately, lots of Typepad bloggers have asked how to get a Pinterest button to show up when hovering over images in blog posts. Today, we've got you covered.
Listen, we get it--you're seduced by neat tricks. They're fancy, they look cool, and you like to show off. We like these things too, which is why this Master Class post will tell you exactly how to setup a hovered image Pin It button. The best part? You don't have to be some Code Jedi, designing your blog from scratch in HTML and Typepad code, calling upon the power of The Schwartz when things get jammed. All Pro plans can use this tip.
The code we're using for this Master Class post is courtesy of bloggersentral.com. Their post details how to add the Pin It button in Blogger and Wordpress blogs, but this code works out-of-the-box for Typepad blogs as well!
Quick Setup
The first, and only, step is to add the code provided below to the correct location in your blog.
For blogs that are using a pre-designed or Theme Builder theme, you will add the code via the Advanced section of your Blog Footer module at Design > Content.
For blogs using Advanced Templates, you would add this code before the </body>
tag in your templates.
The Code
<script>
//<![CDATA[
var bs_pinButtonURL = "http://3.bp.blogspot.com/-y3xzTGiGzH0/UK4XOaUpdaI/AAAAAAAADw8/Z1MH4Jr4Efo/s1600/pinterestx1_72.png";
var bs_pinButtonPos = "center";
var bs_pinPrefix = "";
var bs_pinSuffix = "";
//]]>
</script>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<script
id='bs_pinOnHover'
src='http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bs_pinOnHoverv1_min.js'
type='text/javascript'>
//This Pinterest Hover Button is developed by bloggersentral.com.
//Visit http://www.bloggersentral.com/2012/11/pinterest-pin-it-button-on-image-hover.html for details.
//Please do not remove this attribution.
</script>
If your blog already has a jQuery library installed for another script/feature, then you will need to remove the following line from the above code:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
Once the code is added, save your changes and load your blog. Try hovering over an image.
Quick, simple, pretty! That's it, you can call it a day.
Customizations
If you followed the earlier link to BloggerSentral, you'll see that there are customizations available. They detail how to use a custom image instead of the Pinterest icon that's loaded by default, as well as how to change where it appears.
To
use a custom image, like the one to the left, you will need to update
the image URL in the code above, making certain that you do not remove
the quotation marks around the URL.
e.g. var bs_pinButtonURL = "http://everything.typepad.com/icons/wee_heart.png";
If you want to change the position as well, BloggerSentral offers additional position attributes that you can use:
- topleft
- topright
- bottomleft
- bottomright
- center (default state)
We quite like the center position, but if you'd like your image to appear elsewhere, then choose from one of the above options and replace the "center" attribute with the one of your choice.
e.g.
var bs_pinButtonPos = "bottomright";
For additional customization options, please visit the BloggerSentral link above. To show off your custom images, placement, and more, visit the community forum!
it doesnt work for me
Posted by: The Folding Chair | March 27, 2013 at 09:58 PM
NEVER MIND. IT WORKED! AWESOME ! YAY :)
Posted by: The Folding Chair | March 27, 2013 at 10:33 PM
This is sooooo cool!!!! I have to admit that this is the first time I have ever done anything through Typepad's Master Class and I'm so glad I stepped out of the box and tried something new! Thanks for the code!!! :)
Posted by: kelly sill | March 28, 2013 at 01:04 AM
COOL!!! Thanks for sharing! :D This is why I love TypePad! I get really cool tips in addition to their awesomely efficient support team!
Posted by: Quing Obillos | March 28, 2013 at 01:55 AM
So said !
Posted by: Kiều Gia Trang | March 28, 2013 at 02:11 AM
YES! Typepad, you ARE listening! ;) We do want these nifty little bits and bobs that Wordpress users seem so streets ahead on and that are actually helpful to our users.
Carry on! ;)
Posted by: Love My Dress | March 28, 2013 at 02:52 AM
It's not working for me. I put it before the body tag in my Theme Stylesheet template (makes sense, and that's the only template I see body code) but I've got nothing.
Please advise!
Posted by: Denise | March 28, 2013 at 04:19 AM
Ok -- not working fro me but I am sure it is me! Went to Advanced section module at Design > Content - copied and pasted the L O N G code - hit save...went to my blog and nothing! What am I doing wrong!?!
Posted by: Simple Stampin' | March 28, 2013 at 05:55 AM
In Advanced Templates, which template or templates do we insert the code in?
Posted by: Lydia | March 28, 2013 at 06:23 AM
Help! Installed this in my templates, and it's working, but it has somehow blocked the other Pinterest widget on my sites. I'll send a help ticket on this one.
Posted by: Lydia | March 28, 2013 at 08:04 AM
LOVE IT!! I have been looking and looking for how to do this in Typepad. Thank you SO MUCH!
Posted by: Lyssa Griffin Zwolanek | March 28, 2013 at 10:18 AM
Hi Nat! Looks like you got it to work. Exciting! :D
Posted by: Bri | March 28, 2013 at 01:59 PM
Kelly--look at you stepping outside your comfort zone and rocking this tip. I'm sure your readers will love it. :)
Posted by: Bri | March 28, 2013 at 02:00 PM
We're so glad you're a part of Typepad, Quing, and I'm happy that you enjoyed this tip. :D
Posted by: Bri | March 28, 2013 at 02:02 PM
LOL Thanks for your enthusiasm. Really glad you enjoyed this tip and I hope it's something you can use on your blog. :)
Posted by: Bri | March 28, 2013 at 02:05 PM
Hi Denise! The Stylesheet doesn't apply in this case, since it does not contain any HTML, only CSS. You need to add it to the following templates:
Main Index
Individual
Date Based
Category
Page (optional)
At the very bottom of each template will be the closing body tag that you need to insert the code above. If you're still having some trouble, go ahead and open a ticket at Account > Help > New Ticket, and we'll get it sorted for you. :)
Posted by: Bri | March 28, 2013 at 02:10 PM
Hi Susan. I'm not able to find the code in your blog, so it looks like you removed it. Would you mind enabling it again, and then opening a help ticket at Account > Help > New Ticket so that I can take a look?
Posted by: Bri | March 28, 2013 at 02:15 PM
Hey Lydia. I answered your ticket just a moment ago, but I'll repeat myself here for anyone who has a similar issue:
If you have a jquery item installed in your blog already, remove the script line in the code I provided that calls/loads the jquery library--http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js. Having multiple libraries loading in the same template can create a conflict. Once that's removed, and changes are saved, both should work without issue.
Posted by: Bri | March 28, 2013 at 02:17 PM
Hi Lyssa! I'm really glad we were able to provide you this tip after you'd been looking for it. Hope you and your readers enjoy it. :D
Posted by: Bri | March 28, 2013 at 02:18 PM
Ok....I just did it......
Posted by: Simple Stampin' | March 28, 2013 at 02:27 PM
Yes! I put it in place straight away and it works a treat ;)
--->
http://www.lovemydress.net
Posted by: Love My Dress | March 28, 2013 at 03:45 PM
Easy as - thank you
Posted by: Lisa | March 28, 2013 at 07:52 PM
Ah, thanks so much Brianna! I've just followed your instructions and it worked perfectly. (Next time I'll remember about the CSS, d'oh!)
Posted by: Denise | March 29, 2013 at 05:33 AM
So glad to know it's working for you now. :D
Posted by: Bri | March 29, 2013 at 01:53 PM
Susan, it looks like you had added the code correctly, but the Blog Footer module wasn't enabled to display on your blog. This is why you weren't seeing anything on your images when you hovered over them. I just wanted to point out that the hover effect won't show until the blog is fully loaded. Since your blog takes a while to completely load, you may not see the hover effect for a while. If you want to reduce the load time, I recommend reviewing tips here: http://help.typepad.com/improve_load_time.html
Posted by: Bri | March 29, 2013 at 02:05 PM
Thank you, Thank you, Thank you!! Typepad is awesome!!
Posted by: musemyworld | April 01, 2013 at 07:18 PM
most excellent, used the little heart one, love it!
Posted by: Time Worn Style - Alicia | April 02, 2013 at 07:00 PM
Hi. Installed this and it works beautifully! However, we've found that even on the pages that we don't want a Pinterest hover on, it's there. For example, on this page (http://breathehappiness.typepad.com/my-blog/meet-shaneen.html) the social icons at the bottom of the page content have the hover. Is there some code I can use on that page to remove it? OR to remove pages from the script and just have it for posts?
The code appears to exclude the right hand column, which is good but I can't see in the code how it does this.
Posted by: breathe happiness | April 10, 2013 at 04:45 AM
The hover icon appears on all images in Posts and Pages. If you want to exclude specific images in a Post, then you will need to edit the HTML after you've finished the composition. Once you're finished composing, click the HTML tab and scroll to the section where the images are that you do not want to have a Pinterest icon on. Just before the code for those images, add:
div class='nopin'
Then directly after the code for the images, add:
/div
After you add those two sections, click Publish without switching back to Rich Text beforehand.
Posted by: Bri | April 10, 2013 at 01:43 PM