Community Forums › Forums › Design Tips and Tricks › Pinterest Hover Button on Images- Pretty Young Thing theme
Tagged: pinterest button
This topic contains 2 replies, has 3 voices, and was last updated by triggers 2 months, 3 weeks ago.
-
AuthorPosts
-
January 30, 2013 at 10:59 am #16405
Hi! I was using a tutorial to add a hovering pin it button to my images that I created versus a standard plugin Pin it button. This is the code I was using from a tutorial that says to put it above the <body/> tag.
Where would I put that in my theme? I can’t find html anywhere, is it in the main Genesis theme? Or is there a better way to do this for wordpress? Is there a plug in or widget I can put it in?
this is the code I was going to use:
<script>
//<![CDATA[
var bs_pinButtonURL = "http://i1270.photobucket.com/albums/jj619/PaisleyBlvd/pinit.png";
var bs_pinButtonPos = "center";
//]]>
</script>
<script src=’http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js’ type=’text/javascript’/>
<script src=’http://greenlava-code.googlecode.com/svn/trunk/publicscripts/bs_pinOnHoverv1_min.js’ type=’text/javascript’/>
<!– please do not alter or remove the following code –>
<div id=’bs_pinOnHover’><a href=”http://www.bloggersentral.com/2012/11/pinterest-pin-it-button-on-image-hover.html”>Pin It button on image hover</a></div>February 18, 2013 at 4:05 pm #21106Hi there.
You’ve probably got this sorted by now, but just in case you haven’t, if you go to your Genesis Theme Settings page, down at the bottom you’ll see boxes for Header and Footer scripts.. that’s where you can add the code.
Website: petercoughlin.com
Twitter: petercoughlinMarch 4, 2013 at 6:38 pm #24223Hi,
I’m trying to add a PinIt Pinterest button to images in my posts in the Metro theme. I have these directions for creating the code below.
1. create a file named single.php and place the code you see below.
<?php add_action( 'genesis_post_content', 'pinterest_share_button', 5 ); function pinterest_share_button() { /** Horizontal */ printf( '<div class="pinterest-button"><a href="http://pinterest.com/pin/create/button/?url=%s&media=%s" class="pin-it-button" count-layout="horizontal">Pin It</a><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script></div>', urlencode( get_permalink() ), urlencode( genesis_get_image( array( 'format' => 'url' ) ) ) ); } add_action( 'genesis_post_content', 'pinterest_share_button_after' ); function pinterest_share_button_after() { /** Horizontal */ printf( '<div class="pinterest-button"><a href="http://pinterest.com/pin/create/button/?url=%s&media=%s" class="pin-it-button" count-layout="horizontal">Pin It</a><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script></div>', urlencode( get_permalink() ), urlencode( genesis_get_image( array( 'format' => 'url' ) ) ) ); } genesis();2. Save the file and upload it to your child theme’s directory on your server.
Question: I haven’t done this before. Where do I find the the child theme directory? Is it when I select Genesis -> Import/export ??
I see a Metro Child Theme: Theme Functions (functions.php) file I can edit and add this code to it. If I can add it here instead of uploading it where is the best place to add it?
3. then add to the css file
.pinterest-button iframe { margin: 10px 0; }Also once I add this pinit button will Pinterest automatically see my images? Right now when i try to use the Pinit button in my browser it doesn’t see any images in any of my blog posts.
I would appreciate your feedback.
Thanks! -
AuthorPosts
You must be logged in to reply to this topic.