Text Widget : Content appearing Before widget tittle
-
Hi,
To include the Facebook/Twitter share buttons in text widgets, I created a shortcode.
When I put that short code in the text widget, the title (“partager”) appears before the buttons … strange …url : https://www.voirleloup.com
(in the footer right column)
It is not a css problem as the div containing the buttons is before the div containing the tittle …Any idea ?
thanks
——————————————————-
shortcode code :/*-----------------------------------------------------*/ /* share /*-----------------------------------------------------*/ function guigui_share($atts, $content = null) { $output = get_template_part('template-part-social-share','childtheme'); return $output; } add_shortcode('share', 'guigui_share');
————————————————-
template-part-social-share code :<div class="tt-share clearfix"> <?php global $ttso; $blog_retweet = $ttso->st_blog_retweet; $blog_fb_like = $ttso->st_blog_fb_like; $blog_pinterest = $ttso->st_blog_pinterest; if($blog_retweet == "true") { ?> <span class="retweet-share"> <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script> <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-via="<?php bloginfo('name'); ?>" data-text="<?php the_title(); ?>" data-related="<?php bloginfo('name'); ?>" data-count="horizontal">Tweet </span> <?php } if($blog_fb_like == "true") { ?> <span class="facebook-share"> <iframe src="https://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink(get_The_ID())); ?>&layout=button_count&show_faces=false&&action=like&colorscheme=light"></iframe> </span> <?php } if($blog_pinterest == "true") { ?> <span class="pinterest-share"> <?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?> ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal">Pin It </span> <?php } ?> </div><!-- END tt-share -->
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Text Widget : Content appearing Before widget tittle’ is closed to new replies.