[myad1] Many developers are avoiding plugins on the website. Your website should have limited plugins for another reason. I was searching for the social sharing plugins but all plugins are adding their own CSS. sometimes it’s quite difficult to add our own CSS with them. So, while searching,  I have found the code which will allow you to add your own social sharing buttons with your CSS.

PHP code for Custom Social Sharing Button

Copy below code and paste in the theme files where you want to display the social sharing buttons. You can use the_content hook also to place the php script in before the content or after content.

You can use simply this code in the single.php file to display the social sharing buttons.I’m using Font Awesome in the theme so added <i> tags in it. If you are using it then simply place it as it is and if you want to use the images then add image URL instead of <i> tags.

The code has ul and li structure and you can change it as per your requirement. Get the help from a designer to add the design it or please do let us know if you need a design for it.

<ul class="blog_page_social_ul">
  <li><a href="http://twitter.com/home?status=<?php echo urlencode(get_the_title() .' '. esc_url(get_permalink())); ?>" class="share_tweet" target="_blank" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" ><i class="fa fa-twitter fa-2"></i></a> </li>
  <li> <a href="http://www.facebook.com/sharer.php?u=<?php echo esc_url(get_permalink()); ?>&amp;t=<?php echo urlencode(get_the_title()); ?>" target="_blank" class="share_facebook" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" ><i class="fa fa-facebook fa-2"></i></a> </li>
  <li> <a href="https://plus.google.com/share?url=<?php echo esc_url(get_permalink()); ?>" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="share_google"><i class="fa fa-google-plus fa-2"></i></a></li>
  <li> <a href="https://www.linkedin.com/cws/share?url=<?php echo esc_url(get_permalink()); ?>" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" class="share_google"><i class="fa fa-linkedin fa-2"></i></a></li>
</ul>

You can download it from here also Download