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:
Now preview your button and grab code:
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="http://twitter.com/share" 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="http://platform.twitter.com/widgets.js"></script></div>
<?php
}
}
add_action('thesis_hook_before_headline','add_shoutmeloud_twitter_btn');
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:
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.
Subscribe Updates, Its FREE!

![[Thesis Theme] How To Display Affiliate Ad Box After Post](http://www.shoutmeloud.com/wp-content/uploads/2010/12/ad-box-550x403.png?699e3a)

→
{ 10 comments… read them below or add one }
Nice tip @Harsh, thanks for sharing this
Thanks for your comment Tinh..
Very nice.
I just know twitter official share count button and see in shoutmeloud have tips to use it.
Thanks Harsh
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!
Kindest,
Nabeel
Thanks a lot for this. Now, I’ve finally added the new thesis button to my blog as well
and this function should work on all pages
function add_shoutmeloud_twitter_btn () {
?>
<div style=”float:right; padding-left:3px;”><a href=”http://twitter.com/share” 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=”http://platform.twitter.com/widgets.js”></script></div>
<?php
}
add_action(‘thesis_hook_before_headline’,'add_shoutmeloud_twitter_btn’);
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
Nice guide Harsh, official Twitter buttons are cool!
Just follow your instruction.Nice tips
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!