Adding those social bookmarking buttons at the end of your post

Posted by Daniel - 4,759 Views

social bookmarking buttonsIt is a good option to add the social bookmarking buttons at the end of your post right? The easiest way to do it is by using one of the available plugin called Add Me Dichev, it is a bundle of social bookmarker buttons packed as a WordPress plugin by Alexander Dichev. It will insert some even many social bookmarking buttons at the of end your post. All you need to do is install it to have it setup. That simple BUT unfortunately it does not happen here on my blog.

Somehow the installation of Add Me Dichev is crashing the ContuttoPDF - a php warning message - header already sent (something like that) and it will stop the ContuttoPDF plugin to work - too bad since I like both plugins, so I decide to disable the Add Me Dichev plugin but keep trying to have the feature of it by adding it into the page outside the plugin system or manually as a pure php function.

Did I say manually? Yes, I will show you how to add those buttons manually in case you’re also having the same problem as mine, and here it goes.

First, deactivate the Add Me Dichev plugin then if you take a look on the addme_dichev.php source code you will notice that it only has one function named add_me($content). Copy that function then paste it to your single.php. Save the file so now you have the function ready to be called.

Still in single.php, to call the function, find the_content() function within your wp loop then put this line of code right under it or somewhere you want the bookmarker buttons will be displayed:

If you need to to alter the appearence of the button group you can do it by CSS. The original div block name is “bookmarkbuttons“, just add styling to that div layer to get your desired result.

In case you want to get the same bookmarker buttons styling as what I have for this blog, here is the CSS code:

#bookmarkbuttons img {
padding: 0px;
}

#bookmarkbuttons a {
float: left;
padding: 5px;
border: 1px dotted #fff;
margin-right: 12px;
}

#bookmarkbuttons h3 {
color: #000;
font-weight: bold;
padding-left: 0px;
}

#bookmarkbuttons a:hover {
border: 1px solid #c0c0c0;
}

share this article

Digg del.icio.us Netscape StumbleUpon Yahoo! MyWeb reddit Furl Magnolia Newsvine Technorati SlashDot Blinklist Simpy Google
This post as PDFPosted in: Programming - February 2008 | raw

The following posts are programmatically considered as related to the current post by YARPP Plugin:

  1. How to easily display a cute Google Map inside your WordPress Post