Skip to content

Instantly share code, notes, and snippets.

@akmur
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akmur/7f9b302b9cd8399d81ba to your computer and use it in GitHub Desktop.
Save akmur/7f9b302b9cd8399d81ba to your computer and use it in GitHub Desktop.
Social Manual Sharing, goes in functions.php
function output_social_links() {
global $post;
$permalink = get_permalink($post->ID);
$title = get_the_title();
$content = '
<section class="sharing"
<ul>
<li>
<a href="http://www.facebook.com/share.php?u=' . urlencode($permalink) . '&title=' . urlencode($title) . '" class="icon-share_facebook_30x30 social-fb" target="_blank">FB</a>
</li>
<li>
<a href="http://twitter.com/home?status=' . urlencode($title) . '+' . urlencode($permalink) . '" class="icon-share_twitter_30x30 social-tw" target="_blank">TW</a>
</li>
<li>
<a http://pinterest.com/pin/create/button/?url=' . urlencode($permalink) . '&description=' . urlencode($title) . '" class="icon-share_pinterest_30x30 social-pin" target="_blank">PIN</a>
</li>
<li>
<a mailto:?subject=Take a look at ' . urlencode('$title') . '&body=' . urlencode($title) . ' | ' . urlencode($permalink) . '" class="icon-share_mail_30x30 social-email" target="_blank">EMAIL</a>
</li>
</ul>
</section>
';
echo $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment