Twitter button without the <a> tag

47 Views Asked by At

My twitter button is inside a div, which is inside an <a> tag.

<a href="<?php the_permalink(); ?>"> 
    <div class="wrapper">
        <img src="<?php $url = get_post_thumbnail_id(); $url = wp_get_attachment_image_src($url,'medium'); $url = $url[0]; echo $url; ?>">
        <div class="social-buttons">
            <div class="wrapper facebook">
                <div class="fb-like" data-href="<?php the_permalink(); ?>" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
            </div>
            <div class="wrapper google">
                <div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>" align="center"></div>
            </div>
            <div class="wrapper twitter">
                <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>">Tweet</a>
            </div>
        </div>
    </div>
</a>

The problem is that because the twitter button is an <a> tag, my parent (original) <a> tag doesn't work. Is there a way to integrate the twitter button without the default <a> code?

Thanks!

0

There are 0 best solutions below