Adding Pinterest to Scrolling Social Sharebar

Modifying plugin code is just about as fun as having a root canal; it all comes down to where you’re adding the plugin, and what social media platform your using. Lucky for you, I am obsessed with modifying plugins and I’m here to make your life easier.

Pinterest is the fastest growing social media network to date. Businesses (like yours) should take advantage of this new found fame by incorporating the Pinterest sharing widget to their blog and/or website.

Without further ado, here’s how to add Pinterest to Scrolling Social Sharebar.

Let’s Get Started!

  1. Log into WordPress and navigate to Plugins > Editor.
  2. From the dropdown button select Scrolling Social Sharebar (Twitter Like Google +1 Linkedin and Stumbleupon)
  3. Scroll down towards the bottom of the editor and look for:
    $sharelinks.=’’;
  4. Add the following code before the above mentioned code:
    function disp_ssharebar_func()
    {
    global $post;
    $plink = get_permalink($post->ID);
    $eplink = urlencode($plink);
    $ptitle = get_the_title($post->ID);
    $eptitle=str_replace(array(“>”,”<”),””,$ptitle);
    $twsc=”;$flsc=”;$gpsc=”;$fssc=”;
    $via=get_option(‘ssbar_twittervia’,”);
    if(function_exists(‘get_post_thumbnail_id’)){
    $imageId = get_post_thumbnail_id($pageId);
    $image_url = wp_get_attachment_image_src($imageId,’large’);
    $image_url = $image_url[0];
    } else {
    $image_url = ”;
    }
  5. After $sharelinks.=’<div id=”scrollbarbox”><table width=”60″ cellspacing=”1″ border=”0″>’;
  6. Before the ending ‘; Add <tr><td align=”center”><div style=”margin-top:5px;”><a href=”http://pinterest.com/pin/create/button/?url=’.$eplink.’&amp;media=’.urlencode($image_default).’” count-layout=”vertical”>Pin It</a><script type=”text/javascript” src=”http://assets.pinterest.com/js/pinit.js”></script></div></td></tr>
  7. Then click the Update File button and your done!

Let us know how it worked for you and, as always, contact us or leave a comment below if you need any help adding Pinterest to the Scrolling Social Sharebar. Now get pinning!