So many webmasters want simple share buttons with no junk added. What do I mean by this? In today's world of "free plugins" webmasters do not know what they are getting into. When they install a sharing plugin most of the time it is loaded down with junk. This junk are ads or links to websites that the webmaster is unaware of.
Simple Share Buttons With No Junk Added
I have created a highly customizable share plugin for WordPress. Do not let the code scare you. It is very easy to manipulate this code to your liking.Edit the Images for the Simple Share Plugin with No Junk Added
- Download the zip file for this plugin. Simple Share Download.
- Extract the files if you want to customize it.
- Go to the images folder and replace the images with whatever you like.
- Keep the same file names
- Keep the same size
Edit the Code for the Simple Share Plugin with No Junk Added
Unlike many other plugins this one only has 1 file with code. Here is the code. You can delete or rearrange the buttons to whatever you want. See the video for instructions.<?php /* Plugin Name: Max's simple share mee no JUNK ADDED! * Description: Lightweight Share Buttons with no junk like ads or links ot other websites! * Author: Maximus McCullough * Version: .1 */ function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); $first_img = $matches[1][0]; if(empty($first_img)) { $first_img = plugins_url( '/share/images/noimge.png', dirname(__FILE__) ); } return $first_img; } function sharemee($content) { if(!is_feed() && !is_home()) { $perma=get_permalink( $postid); $posttn=catch_that_image(); $postitle=get_the_title( $ID ); $content.= ''; $content.= '<a href="http://www.facebook.com/sharer.php?u='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/facebook.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://twitter.com/share?url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/twitter.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="https://plus.google.com/share?url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/google.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://www.digg.com/submit?url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/diggit.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://reddit.com/submit?url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/reddit.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://www.linkedin.com/shareArticle?mini=true&url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/linkedin.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://pinterest.com/pin/create/button/?url='.$perma.'&media='.$posttn.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/pinterest.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="http://www.stumbleupon.com/submit?url='.$perma.'" target="_blank"> <img id="sharing" src="' . plugins_url( '/share/images/stumbleupon.png', dirname(__FILE__) ) . '" alt="" /></a>'; $content.= '<a href="mailto:?Subject='.$postitle.'&Body=I%20saw%20this%20and%20thought%20of%20you!%20'.$perma.'"> <img id="sharing" src="' . plugins_url( '/share/images/email.png', dirname(__FILE__) ) . '" alt="" /></a>'; } return $content; } add_filter ('the_content', 'sharemee'); ?>