Skip to content

Instantly share code, notes, and snippets.

@thanhluu
Created August 27, 2018 03:44
Show Gist options
  • Save thanhluu/f754e9bdb7865db1f13270464bdfeae3 to your computer and use it in GitHub Desktop.
Save thanhluu/f754e9bdb7865db1f13270464bdfeae3 to your computer and use it in GitHub Desktop.
Social Share
function maki_social_share() { ?>
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<iframe src="https://www.facebook.com/plugins/share_button.php?href=<?php echo get_permalink(); ?>%2F&layout=button_count&size=small&mobile_iframe=true&appId=256426884379026&width=78&height=20" width="78" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
<script src="https://apis.google.com/js/platform.js" async defer></script><g:plus action="share"></g:plus>
<?php }
add_filter( 'the_content', 'maki_social_share' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment