Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Statische Share-Buttons für die einzelnen Artikel - Facebook, Twitter, Google + und Xing.
*
* @uses Hook "evolution_after_thumbnail()"
*/
function ah_sticky_sharebar() {
global $post;
if ( is_single() ) :
?>
<div class="swp_social_panelSide swp_social_panel swp_default swp_default_full_color swp_individual_full_color swp_other_full_color slide swp_float_left swp_side_center scale-100 float-position-center-left swp_three" data-position="none scale-100" data-float="left" data-count="3" data-floatcolor="#ffffff" data-screen-width="900" data-transition="slide" data-float-mobile="bottom" style="top: 79px; left: 5px;">
<div class="nc_tweetContainer swp_facebook" data-network="facebook">
<a class="facebook nc_tweet" 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 class="swp_count swp_hide" style="transition: padding 0.1s linear;"><span class="iconFiller"><span class="spaceManWilly"><i class="sw fab fa-facebook-f"></i><span class="swp_share">Teilen</span></span></span></span>
</a>
</div>
<div class="nc_tweetContainer swp_twitter" data-network="twitter">
<a class="twitter nc_tweet" 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 class="swp_count swp_hide" style="transition: padding 0.1s linear;"><span class="iconFiller"><span class="spaceManWilly"><i class="sw fab fa-twitter"></i><span class="swp_share">Twittern</span></span></span></span></a>
</div>
<div class="nc_tweetContainer swp_pinterest" data-network="pinterest">
<a href="//pinterest.com/pin/create/link/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;description=<?php echo rawurlencode(strip_tags(get_the_title())) ?>" target="blank" rel="nofollow" class="nc_tweet" title="Auf Pinterest teilen"><span class="swp_count swp_hide" style="transition: padding 0.1s linear;"><span class="iconFiller"><span class="spaceManWilly"><i class="sw fab fa-pinterest-p"></i><span class="swp_share">Pinnen</span></span></span></span>
</a>
</div>
<div class="nc_tweetContainer swp_xing" data-network="xing">
<a class="xing" href="http://www.xing.com/app/user?op=share;url=<?php echo urlencode(get_permalink($post->ID)); ?>;title=<?php echo rawurlencode(get_the_title()); ?>;provider=<?php echo rawurlencode(get_bloginfo('name')); ?>" target="blank" title="Bei XING empfehlen"><span class="swp_count swp_hide" style="transition: padding 0.1s linear;"><span class="iconFiller"><span class="spaceManWilly"><i class="sw fab fa-xing"></i><span class="swp_share">Teilen</span></span></span></span>
</a>
</div>
<div class="nc_tweetContainer swp_linkedin" data-network="linkedin">
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink() ?>&title=<?php the_title(); ?>&summary=&source=<?php bloginfo('name'); ?>" target="blank" rel="nofollow" class="nc_tweet"><span class="swp_count swp_hide" style="transition: padding 0.1s linear;"><span class="iconFiller"><span class="spaceManWilly"><i class="sw fab fa-linkedin-in"></i><span class="swp_share">Teilen</span></span></span></span>
</a>
</div>
</div>
<?php endif;
}
add_action( 'wp_footer', 'ah_sticky_sharebar' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.