Social Media & Influencer Marketing

Social Bookmarks: Hide and Seek

UPDATE: – With the new site design and the lack of usage of the links, I decided to take them off. No complaints thus far! This modification still works if you would like to use it.

I was the butt of some joking going on over at Nektros. The entry was all about why you should get rid of all of those one-click social bookmarking links on your site. I’ve had a few other folks comment on them as well… someone told me I only had 25 [sarc].

I didn’t want to take them off… I kind of like them. I’m not sure why exactly, but I do. Besides making it easy to bookmark my page, I also want folks to see all the sites out there that help bookmark. There’s a ton of them! I’m sure, sooner or later, the good ones will rise to the top and the others will die off, but I don’t want to pressure anyone to use one or the other.

So… I did what any good hacker would do. I hacked the Sociable plugin and added some JavaScript that toggles the buttons on or off. It took 3 changes:

  1. Edit the Sociable Plugin to add the link to click on and off… note the bottom line hasn’t changed… that’s just to show you where to put the code in:
    <?php $post = $wp_query->post;
    $html .= '<ul><li><a class="link" title="Display all of the Social Bookmarking options." onClick="showdiv(\'bookmark_'.$postid.'\');">Social Bookmarking</a></li></ul>';
    $html .= '>div id="bookmark_'.$postid.'" class="sociable" style="display:none"><span class="sociable_tagline">';
    $html .= get_option("sociable_tagline"); ?>
  2. Edit the Sociable.css file to set add a hand/pointer cursor… because it’s simply an onclick event and not really a link:
    .link {
    cursor: hand;
    cursor: pointer;
    }
  3. Edit your theme’s header file to put the generic function in to toggle the div on and off:
    <script language="javascript">
     function showdiv(name){
     var obj = (document.getElementById)? document.getElementById(name) : eval("document.all[name]");
     if (obj.style.display=="none"){
     obj.style.display="";
     }else{
     obj.style.display="none";
     }
     }
    </script>

So, clicking the Social Bookmarking link will toggle the content on and off for the specific post!

Appreciate this content?

Sign up for our weekly newsletter, which delivers our latest posts every Monday morning.

We don’t spam! Read our privacy policy for more info.

Douglas Karr

Douglas Karr is a fractional Chief Marketing Officer specializing in SaaS and AI companies, where he helps scale marketing operations, drive demand generation, and implement AI-powered strategies. He is the founder and publisher of Martech Zone, a leading publication in marketing technology, and a trusted advisor to startups and enterprises alike. With a track record spanning more than $5 billion in MarTech acquisitions and investments, Douglas has led go-to-market strategy, brand positioning, and digital transformation initiatives for companies ranging from early-stage startups to global tech leaders like Dell, GoDaddy, Salesforce, Oracle, and Adobe. A published author of Corporate Blogging for Dummies and contributor to The Better Business Book, Douglas is also a recognized speaker, curriculum developer, and Forbes contributor. A U.S. Navy veteran, he combines strategic leadership with hands-on execution to help organizations achieve measurable growth.

Related Articles

Back to top button
Close

Adblock Detected

We rely on ads and sponsorships to keep Martech Zone free. Please consider disabling your ad blocker—or support us with an affordable, ad-free annual membership ($10 US):

Sign Up For An Annual Membership