Skip to content

Instantly share code, notes, and snippets.



Last active Dec 21, 2015
What would you like to do?
Custom share functionality
function healingartsweb_custom_share() {
$post_type = get_post_type_object( get_post_type($post) ); ?>
<div class="custom-share-container">
<h3>Share this <?php echo $post_type->labels->singular_name ?></h3>
<ul class="social-media-icons clearfix">
<li class="facebook"><a href="<?php echo get_permalink();?>&t=<?php the_title();?>" target="_blank" title="Share on Facebook">&#xe002;</a></li>
<li class="twitter"><a href="<?php echo get_permalink();?>&text=<?php the_title();?>" target="_blank" title="Share on Twitter">&#xe000;</a></li>
<li class="google-plus"><a href="<?php echo get_permalink();?>" target="_blank" title="Share on Google Plus">&#xe003;</a></li>
<!--Remove comment to enable linked in sharing
<li class="linked-in"><a href="<?php echo get_permalink();?>&title=<?php the_title();?>" target="_blank" title="Share on Linked In">&#xe005;</a></li>
<li class="email"><a href="mailto:?subject=<?php the_title();?>&body=From <?php bloginfo('name');?>: <?php echo get_permalink();?>" title="Send Email" target="_blank">&#xe010;</a></li>
</div><!--End custom share-->
<?php } //End Custom Share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.