How to add retweet button into teaser and posts of thesis wordpress theme
Adding retweet button into posts and the homepage teasers of thesis is quite important if you consider providing your readers more sharing option for twitter.You can add retweet button widget into posts by using the Tweetmeme wordpress plugin.But if you consider “adding plugins might slow down your wordpress blog load time” then you can try this way without any plugins.It is very simple that adding a code into the custom_functions.php can solve it.
How to add Retweet into teaser box at homepage:
To add the retweet option by tweetmeme inside the teaser box you have to add this code into the custom_functions.php from you thesis custom file editor.Be sure to change your username from “sensehow” to yours.
/* TWITTER BUTTON INSIDE TEASER BOX */
function tweet_button_left() {
?>
<div id='twittley_button' style='float:left;margin-right:10px;'>
<script type="text/javascript">
tweetmeme_source = 'sensehow';
tweetmeme_url = '<?php echo get_permalink($postid); ?>';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>
<?php }
add_action('thesis_hook_before_teaser', 'tweet_button_left');
You can change the location to right by changing
style='float:right;margin-left:10px;'>
How to add retweet into posts without plugin:
To add the retweet button into posts add the below code into the custom_functions.php file using the default thesis file editor.
/* TWITTER BUTTON INSIDE POST BOX */
function tweet_button_left1() {
if(!is_page()){
?>
<div id='twittley_button1' style='float:right;margin-left:10px;'>
<script type="text/javascript">
tweetmeme_source = 'sensehow';
tweetmeme_url = '<?php echo get_permalink($postid); ?>';
</script>
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</div>
<?php } }
add_action('thesis_hook_before_post', 'tweet_button_left1');
I hope now you could have successfully added the tweetmeme retweet button into thesis teaser and inside posts without any plugin.
ANY PROBLEMS? DO POST A COMMENT.
Related posts:
- How to add retweet button in your wordpress theme
- How to add google plus one button to Thesis wordpress theme
- How to add floating back to top button in thesis wordpress theme
- How to add stylish asnio 3 column footer to thesis wordpress theme
- How to add author profile box below posts in wordpress themes
- How to add featured posts in custom feature box in thesis wordpress theme



