ShoutMeLoud – Shouters Who Inspire

≡ Menu
≡ Menu

How to Add Twitter Official Share Count Button Into Thesis WordPress Theme

How to Add Twitter Official Share Count Button Into Thesis WordPress Theme

In our last post we informed you about launch of official Twitter share count button and now I’m sharing a quick tutorial on Adding this button into Thesis WordPress Theme.

To get started with this: Go to Tweetbutton page and configure your button:

twi thumb

Now preview your button and grab code:

previewbuttongrabcode thumb

Now open your custom_functions.php file of Thesis which you can access via FTP or also from dashboard.

Before performing any change, take a back up of your custom folder, so if  you make any mistake, you can quickly revert back.

Now add this code into your custom_functions.php file:

function add_shoutmeloud_twitter_btn ()  {
if (is_single()) { ?>
<div style="float:right; padding-left:3px;"><a href="" class="twitter-share-button" data-count="vertical" data-via="denharsh" data-related="shoutmeloud:official Blog Twitter Handle: Must Follow">Tweet</a><script type="text/javascript" src=""></script></div>


now replace the code between <a href and <script> with the code generated by you.

or simply in the above given code, replace denharsh with your twitter handle and shoutmeloud with your secondary twitter handle.

If you have done everything right, your blog will have Twitter official share count button like this:

tweetofficial thumb

I hope this tutorial will help you to add Twitter button into your Thesis theme within minutes. If you still have problem understanding, ask via Comment or you can hire my team for customizing your Thesis theme.

If you have not purchased Thesis theme till now, get it now, because with Thesis 2.0, prices are going to increase.

Download Thesis now

  • Author Bio

  • Latest Post

Article by Harsh Agrawal

Harsh has written 1094 articles.

If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

{ 10 comments… add one }

  • Muhammad Qasim

    Hey Harsh, nice tips as usual,

    But I have one question dear, I want to add this twitter official button to my thesis homapage, so that it is shown just below each post title on homepage without plugin. Unable to do it!

    Shall be very thankful if you help me in this regard!

  • Hung | Jvprime

    Just follow your instruction.Nice tips

  • Anterpreet

    Nice guide Harsh, official Twitter buttons are cool!

  • CoderPlus

    My previous comment would need editing because the comment form automatically parsed &qout; to ” Kindly edit the code in the previous comment and delete this one :)

  • CoderPlus

    and this function should work on all pages
    function add_shoutmeloud_twitter_btn () {
    <div style=”float:right; padding-left:3px;”><a href=”” class=”twitter-share-button” data-count=”vertical” data-url=”<?php global $post; echo get_permalink($post->ID);?>” data-title=”<?php echo $post->post_title;?>” data-via=”denharsh” data-related=”shoutmeloud:official Blog Twitter Handle: Must Follow”>Tweet</a><script type=”text/javascript” src=””></script></div>


  • Jens P. Berget

    Thanks a lot for this. Now, I’ve finally added the new thesis button to my blog as well :)

  • Nabeel | Create Your First Website

    Hi Harsh,

    The official Twitter share count button is looking better than the tweetmeme. The design of the button is just better than the unofficial version.

    It’s looking great on Shoutmeloud!


  • Hieu Martin@Blog Tips

    Very nice.
    I just know twitter official share count button and see in shoutmeloud have tips to use it.
    Thanks Harsh

  • Tinh

    Nice tip @Harsh, thanks for sharing this


Leave a Comment