[How to] Customize Retweet Feature in Multiauthor WordPress blogs

HowtoCustomizeRetweetFeatureinMultiauthorWordpressblogs11 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

Twitter is the vital source for bloggers to share and promote their content. Retweet allows visitors to share the content using their twitter account. All bloggers are using Retweet button on their blogs to get huge traffic from twitter. Today i am going to share with you a simple trick where in you can customize your Retweet feature in your Multiauthor WordPress blog.

In Multiauthor blogs , when Authors post their content , it is well displayed and shared with others through various social bookmarking sites. Twitter is one among them. We use Retweet button on each post to get more traffic. When visitors click on Retweet button , it connects their twitter account and hence tweets the post in the following format :

RT @twitter-id   <———–Post-title———-> <Post url>.

[Using Tweetmeme plugin]. So in Multiauthor blogs , whoever may be the Author but by default the twitter-id is always of the Admin of that blog. So here i will be showing how to replace the default twitter-id with the Author’s twitter-id icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs . To do this you must use Tweetmeme plugin and follow the below steps :

Step 1: Adding a New field in Author’s bio

  • In this step instead of adding a new field in Author’s bio , i would use the existing empty field in the Author’s bio as shown below

changelabelstep1 thumb11 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • As shown in the above image , we would change the label “AIM” to “Twitter id”  or  “Twitter id without @”  [without quotes]. Here is how it is :

Firstly login to your ftp and point to the root directory where you have installed wordpress.

  • Browse to the  /wp-includes directory.
  • Open registration.php file present it

1 thumb11 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • Edit the file registration.php

Search for “AIM” in the file  and change it to “Twitter-id without @”. [without quotes] as shown below:

changelabel thumb1 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • Now refresh your author profile page and see whether the label changed as below image

laststep thumb1 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

Step 2 : Adding block of codes Tweetmeme plugin file

Now we will be editing the tweetmeme plugin file to achieve this Retweet feature icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs . Follow the steps as shown below :

  • Browse to the wp-content/plugins/Tweetmeme folder

step21 thumb11 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • Open tweetmeme.php file to edit

step22 thumb1 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • After opening the tweetmeme.php file , edit the following codes as shown below :

Search for “global $post;” [Without quotes] and for the first search add the below code under it

// Block of code added by sunil jain on 28 Mar 2010
      $author_info = get_userdata($post->post_author);
 $retweetid = $author_info->aim ? $author_info->aim: get_option('tm_source');
  //End of block

Have a look at the screen shot :

step23 thumb11 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

  • Search for “ if (get_option(‘tm_source’)) {“ [without quotes] and replace it with the below code :
if ($retweetid) {

Have a look at the screenshot below :

step2411 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

Now you don’t need to worry about your blog authors as their twitter id will be mentioned each time when any visitor tweets it icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs
Note : If any author doesn’t want to use his/her twitter id then by default Admin can insert his/her Twitter id to the options of Tweetmeme Plugin Settings page  via WordPress Dashboard as shown below :
Tweetmem Wordpress Plugin Settings Options 300x160 [How to] Customize Retweet Feature in Multiauthor Wordpress blogs
==============================================================================================
We are very much glad that you read this wonderful trick  icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs . Your comments are valuable and also share it with others if you liked it icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs icon smile [How to] Customize Retweet Feature in Multiauthor Wordpress blogs

Sunil Jain

I am a part-time cool blogger :D, who loves WordPress and Social Media. You can tweet with me => @gupshupblog

You may also like...

  • http://www.famousbloggers.net Hesham @ FamousBloggers

    Very useful, great work!

    Development of blog is going on fire these days, I can not stop playing with my blog ;)
    .-= Hesham @ FamousBloggers´s last blog ..I Lost Twitter Id field after upgrading to Thesis 1.7, what to do? =-.

    • http://tech18.com Sunil Jain

      Ya you are wright Hesham :) :)
      The more you customize your blog , the more loyal visitors you get :) :). This will be a juicy step for all your authors :) :) :)
      Thanks for commenting :)

  • http://www.shoutmeloud.com Harsh Agrawal

    This is really cool and I'm going to implement on my blog… Just need to make change when user will not use his own ID, then it should pull up default twitter iD…
    .-= Harsh Agrawal´s last blog ..Download Thesis 1.7 WordPress Theme =-.

    • http://tech18.com Sunil Jain

      Thanks Harsh :) :)
      At the bottom of the post , I have also told about it , Just go to the Tweetmeme Plugin Settings Page and add the Default id , It is working :) :)
      As i am using ternary operator to in order to get the $retweetid value , either it takes the Author's twitter id or the id entered in the Tweetmeme setting page . :) :) :) , Let me know if any prob ? :) :)

      • http://www.shoutmeloud.com Harsh Agrawal

        Ahh looks good… Getting it done asap. Thanks for this useful tutorial :)
        .-= Harsh Agrawal´s last blog ..Thesis 1.7 WordPress Premium Theme Review =-.

        • http://tech18.com Sunil Jain

          Yo welcome :) :)

  • http://techravings.info Aditya @ Tech Raving

    That was a wonderful tutorial bro. I am looking forward to implementing it. Thanks for the info.
    .-= Aditya @ Tech Ravings´s last blog ..A List Of Social Media Sites To Roll In The Traffic =-.

    • http://tech18.com Sunil Jain

      I am very much glad to see your comment here :) :)
      Thanks for commenting bro :) :)
      Come to gtalk need to talk about another trick ;) :) :)

  • Chuck Reynolds

    Um… I don't think you should be telling people to edit core WordPress files… there are ways to remove those and add an additional field via functions in the theme's functions.php file. Editing core files is bad lol.

    Check out Justin Tadlock's site for the info on that: http://justintadlock.com/archives/2009/09/10/addi
    .-= Chuck Reynolds´s last blog ..Local Search Marketing using Foursquare =-.

    • http://tech18.com Sunil Jain

      You are one way wright dude :)
      But as a beginner in php, I just changed the label of the AIM field and also this trick was for all those bloggers who never do much of codings ;).

      Being a programmer I always agree to your words , So I would also write how to add twitter field into the user profile as said here http://justintadlock.com/archives/2009/09/10/addi

      Thanks for your valuable feedback :) :)
      Stay in touch :) :)

  • http://www.win-with-1.com Alison Moore Smith

    Wonderful! I own a large group blog and this solves a problem for me. Thank you!
    .-= Alison Moore Smith´s last blog ..WordPress Backup: A Two-Step Process =-.

    • http://tech18.com Sunil Jain

      Hi Alison :)
      I am glad that you liked this tutorial :) :)
      I hope this helps you and your group members :) :)
      Thanks for commenting :) :)

  • Ankit

    Simply awesome! Nice tutorial bro.. Gonna implement it on my blog. :)

  • Siddhu

    This is really amazing… It'll save my own account from spam…
    .-= Siddhu´s last blog ..Tips to write better articles =-.

    • http://tech18.com Sunil Jain

      I guess you haven’t read the post properly ;)
      This tweak will help many multiauthor wordpress blogs to give tweet love to their authors :) :) :)

  • http://www.madrasgeek.com Srivathsan G.K

    Amazing stuff :) thank you so much for sharing the informative article.

    • http://tech18.com Sunil Jain

      Thanks for your comment Sri :) :)
      Let me know if you need any help in having this hack in your blog :) :)

      off topic : I can call you Sri wright? :) or what do you want me to call you ?? :) :)

  • blinkky

    Look very complicated. But I'm sure it's might help a lot of bloggers out there =)

    • http://tech18.com Sunil Jain

      It is complicated if you are adding custom field and using the field value , here i have just renamed the already present empty field and then used it :) :)
      Thanks for commenting bro :) =)

  • http://wassupblog.com/ Sire

    Even though I do not allow other to share my blog I know that there are many that do. That being the case this is a very important post, one that should be shared, and so I have Tweeted it for you ;)

    • http://tech18.com Sunil Jain

      Oh thank you very much Sire :) :)
      Let me know if you need any help in wordpress ?? :) :)
      Thanks for commenting :) :)

  • http://www.techfreakstuff.com Rohit Sane

    This is a really good contribution dude.. I think you have hacked into the WordPress files and done a really good job to help all of the WP users here..

    Offtopic: You can participate in the contest on my blog: http://bit.ly/aOdZaR

  • Ramkumar

    Wow nice tip mate, I have been using common id for my blogs,. This will really help :)

    • http://tech18.com Sunil Jain

      But if you are thinking of guest posting in your blog , then this will help you and your guest authors :) :) :)

      Thanks for the comment :) :)

  • Genite

    Nice research Sunil this will work perfect for me.

  • Shiva

    Oh, this is simply awesome. I have been getting quite a few number of guest bloggers the last few days and this is certainly going to help to get more added exposure in Twitter. When the post gets retweeted with the author's id itself it gets amplified to the author's followers ;) Thanks a lot man