Skip to content

Instantly share code, notes, and snippets.

Created August 24, 2016 15:21
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 anonymous/1b79b9933e294fc95cf07dbe89aa8f08 to your computer and use it in GitHub Desktop.
Save anonymous/1b79b9933e294fc95cf07dbe89aa8f08 to your computer and use it in GitHub Desktop.
<?php
// Ab hier kopieren
/**
* Statische Teilen Buttons mit Druck-Button
* Passe noch die URL Deiner Facebook-Seite an. Der zweite Link von unten.
*
*/
function tb_share_buttons() {
?>
<div class="share-container">
<div class="share-buttons">
<a class="facebook social" title="Bei Facebook empfehlen" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;t=<?php echo rawurlencode(strip_tags(get_the_title())) ?>" target="blank" rel="nofollow"><span>Teilen</span></a>
<a class="twitter social" title="Bei Twitter empfehlen" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php echo rawurlencode(strip_tags(get_the_title())) ?> <?php echo urlencode(get_permalink($post->ID)); ?>" target="blank" rel="nofollow"><span>Twittern</span></a>
<a class="googleplus social" title="Bei Google+ empfehlen" href="https://plusone.google.com/_/+1/confirm?hl=de&amp;url=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;title=<?php echo rawurlencode(strip_tags(get_the_title())) ?>" target="blank" rel="nofollow"><span>Google+</span></a>
<a class="fb-like social" href="https://www.facebook.com/TechBrain-552504691587032" target="_blank" rel="nofollow" title="Meine Facebook-Seite Liken"><span>Like</span></a>
<a class="druck social-tooltip" href="javascript:window.print()" title="Beitrag ausdrucken">Drucken</a>
</div>
</div>
<?php }
function tb_fontawesome() {
?>
<link rel="stylesheet" href="https://opensource.keycdn.com/fontawesome/4.5.0/font-awesome.min.css" type='text/css' media='all' />
<?php }
add_action( 'wp_enqueue_scripts', 'tb_fontawesome' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment