Plugins can be a security risk and also cause your site to load slower than it would otherwise.  I always find ways I can get something accomplished inside WordPress without using any plugins.  The reality is that plugin use is unavoidable, but at least you can keep the amount of plugins you need to use on your site to a minimum if you find useful scripts online that can accomplish what a plugin normally would.

Social share buttons WordPress

Some plugins have security risks due to hackers easily being able to find exploits and/or plugin makers including things like tracking codes.  When I did a scan–I have found a lot of social share plugins have tracking codes that call up URLs unheard of.

The script below will automatically display Twitter, Google+ and Facebook social share buttons, but Facebook won’t work unless you include the Facebook header script which you can find on the Facebook page plugin generator. It is same script that is being used on the social share butons on this article you are reading now.

Paste the below code which I pasted in Paste2–in  Appearance > Editor > above the  “Php The Content php tag in Single.php or the place where your theme calls Single posts.  Make sure you also post the Facebook page plugin header code in the header file right before the < / head > tag in your theme and the social share buttons should display.  Don’t forget to backup your WordPress Single.php and header.php when pasting the code just in case anything goes wrong.