Skip to content

Instantly share code, notes, and snippets.

@matthiaspabst
Last active February 28, 2017 11:09
Show Gist options
  • Save matthiaspabst/1524551 to your computer and use it in GitHub Desktop.
Save matthiaspabst/1524551 to your computer and use it in GitHub Desktop.
Teilen-Buttons für Facebook und Twitter ohne Plugin in WordPress integrieren
<div class="sharebuttons">
<div class="twitter">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="dein-twitter-name" data-url="<?php echo urlencode(get_permalink($post->ID)); ?>" data-text="<?php echo rawurlencode(get_the_title()); ?>">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div><!-- .twitter -->
<div class="facebook">
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
</div><!-- .facebook -->
</div><!-- .sharebuttons -->
/*Sharebuttons*/
.sharebuttons { clear: both; margin: 10px 0; }
.sharebuttons .twitter { float: left; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment