Skip to content

Instantly share code, notes, and snippets.

@leobauza
Last active August 29, 2015 14:05
Show Gist options
  • Save leobauza/5b3b4bd2aec69a3c4b4c to your computer and use it in GitHub Desktop.
Save leobauza/5b3b4bd2aec69a3c4b4c to your computer and use it in GitHub Desktop.
This goes with socialhandlers.js
<?php
$f_share_url = get_permalink();
$tweet_via = "PoettersBetter";
$tweet_text = get_the_title();
?>
<nav class="nav--share">
<ul>
<li class="title">Share</li>
<li class="fbook"><a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5burl%5d=<?php echo urlencode($f_share_url); ?>">facebook</a></li>
<li class="twitter"><a href="https://twitter.com/share?url=<?php echo urlencode(the_permalink()); ?>&via=<?php echo $tweet_via?>&text=<?php echo urlencode($tweet_text)?>">twitter</a></li>
</ul>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment