How to make a new function that includes a template
Add your share button html to a template file in your theme: your-theme/share-buttons.php <a href=”http://twitter.com/home/?status=<?php the_title(); ?> – <?php the_permalink(); ?>” target=”_blank” title=”Tweet this!”><img src=”http://localhost:8888/wordpress/wp-content/uploads/2016/10/social-twitter.png”></a> <a href=”http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>” target=”_blank” title=”Share on Facebook.”><img src=”http://localhost:8888/wordpress/wp-content/uploads/2016/10/social-facebook.png”></a> <a href=”http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); echo $url; ?>” target=”_blank”><img src=”http://localhost:8888/wordpress/wp-content/uploads/2016/10/social-pinterest.png”></a> <a href=”http://www.bloglovin.com/e/?b=’ .get_bloginfo(‘wpurl’) . ‘&p=’ .get_permalink().’&t=”.get_the_title().””onclick=\’window.open(this.href,"bloglovin_like","height=320,width=480,toolbar=0,location=0,menubar=0,scrollbars=0,status=0"); … Read more