Add facebook twitter googleplus linkedin social share buttons as a developer point of view so that you can implement it without any dependency on third party.

Here I am giving some very quick codes to add these social share buttons on WordPress … fixed on the right side at every page.

Why do we need this custom?

As a developer i tried using a lot of plugins but on basis of optimization i found each unsupported. Some was lacking alt tag, some was lacking height and width attribute and few wasn’t with css stripes . So i needed to code it directly to my blog.

Just keep in mind Its a very simple.

  1. Create a function and put it under function.php

It will automatically get your URL and create a share link for all above share mediums.

2. Now call a function anywhere you want to show.

<?php echo shaky_social_share(); ?>

You can also create  a wordPress short-code for it. see how to create shortcodes in wordpress

3. Some Stylesheet.

You have to add your own image and set background position accordingly. Here i am using below image:

banner-share

 

Leave a Reply