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 : http://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 ?
thanksshortcode code :
[code]
/*-----------------------------------------------------*/
/* share
/*-----------------------------------------------------*/
function guigui_share($atts, $content = null) {
$output = get_template_part('template-part-social-share','childtheme');
return $output;
}
add_shortcode('share', 'guigui_share');
[/code]template-part-social-share code :
[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="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
<a href="http://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="http://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 -->
[/code] -
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
-
We cannot help you here at WordPress.com with that site as it’s not being hosted by WordPress.com and we run on different software. This is the correct forum for your software http://wordpress.ORG/support/
Please read > WordPress.com vs WordPress.org: The Differences
http://support.wordpress.com/com-vs-org/
Best wishes with your site. -
- The topic ‘Text Widget : Content appearing Before widget tittle’ is closed to new replies.