LIKE BUTTON POSITION

Posted in: Newspaper
Post count: 2

i would want to change the position of the fb like&share button, currently in the posts they appear below the content. But i would like to move it to the top. Please suggest a way to make that possible

Post count: 3343

Hi,
1. Add this code:

    function get_social() {
        $social_sharing = 1;

        $buffy .= '
            <div class="td-social-sharing">
                ' . $wrapper_post_tags;

        if($social_sharing == 1) {

            $image = wp_get_attachment_image_src( get_post_thumbnail_id( $this->post->ID ), 'single-post-thumbnail' );
            $buffy .= '
                <div class="td-tags-and-social-wrapper-box td-tags-and-social-wrapper-box-bottom-line">
                    <a class="td-social-sharing-buttons td-social-twitter" href="https://twitter.com/intent/tweet?text=' . $this->title . '&url=' . urlencode(get_permalink()) . '&via=' . get_bloginfo('name') .'" onclick="window.open(this.href, \'mywin\',
\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;" ><div class="td-sp td-sp-share-twitter"></div><div class="td-social-but-text">Twitter</div></a>
                    <a class="td-social-sharing-buttons td-social-facebook" href="http://www.facebook.com/sharer.php?u=' . urlencode(get_permalink()) . '" onclick="window.open(this.href, \'mywin\',
\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><div class="td-sp td-sp-share-facebook"></div><div class="td-social-but-text">Facebook</div></a>
                    <a class="td-social-sharing-buttons td-social-google" href="http://plus.google.com/share?url=' . get_permalink() . '" onclick="window.open(this.href, \'mywin\',
\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><div class="td-sp td-sp-share-google"></div><div class="td-social-but-text">Google +</div></a>
                    <a class="td-social-sharing-buttons td-social-pinterest" href="http://pinterest.com/pin/create/button/?url=' . get_permalink() . '&media=' . (!empty($image[0]) ? $image[0] : '') . '" onclick="window.open(this.href, \'mywin\',
\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><div class="td-sp td-sp-share-pinterest"></div><div class="td-social-but-text">Pinterest</div></a>
                </div>';
        }

        return $buffy . '</div>';
    }

here: http://screencast.com/t/FRoZLoFTFFQ

2. Add this: <?php echo $td_mod_single->get_social();?> like here: http://screencast.com/t/oQ587egNmFo

Thanks!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.