Make Money Online From Your Home
Powered by MaxBlogPress  

 


Twit This WordPress Code

Learn the techniques I used to top the search engines. Check out SEO Made Easy and learn search engine optimization fast!

I call this a Twit This WordPress Code since it’s not actually a plugin. Hehe. I got this idea after reading John Chow’s post about the Twit This Post WordPress plugin.

I like the idea. It is indeed a brilliant idea giving your readers an easy way to twit what they’ve read from your blog with a single click of a button. However, as I checked the plugin, it involves too much coding with a dependency to a 3rd party URL shortening service and involves caching of links. Eversince I learned how to shorten my post link without using those services, I never used TinyURL again on linking to my posts in Twitter. Of course, if people are going to link to my post, I don’t want them to use them either. Instead, they must use the shorter link version of my post, thus eliminating the dependency to a 3rd party service.

Since that option is not available on that plugin, I decided to create my own code. Yeah, just a code, not a plugin. Why add a plugin with so much code in it when I can simply have the same function by just adding a simple code?

Ok, here’s the code. Just add it on your single.php code, just below your post.

Just replace @marhgil with your own Twitter ID, macuha.com with your own domain name, and the img src “http://www.macuha.com/Twitter.png” with your own image link. Of course, you can modify the code as you like.

If you don’t want to have an image link, the following code will suffice:

You can see this code in action on this blog. ;)

If you hate tinkering with codes and you don’t mind using a 3rd party service, use that plugin instead. No support will be given when using my code. Use it at your own risk, ok? Who needs support for such a short code? Hehe.

Update: John Chow is now using this code on his blog! Check his shout out here!

Update: You can also add the Twit This link on your RSS feed. Here’s how. ;)

Update: This code is now featured on John Chow’s blog!

Update: I’ve modified the code above to insert the nofollow tag as recommended by John Chow on his post.

Twit This Post! Plurk This Post!

Download your free Guerilla Bloggers' e-book here!

Bored? Play Pinoy HangARoo!

Play Free Flash Games

If you like this post, buy me a beer!

Entries you might like...

  • Add Twit This On Your RSS Feeds
  • If you added the Twit This code on your blog, I think it's also a good idea to put that same link on your RSS feed. Your RSS feed readers might not bo...

  • Plurk This Post WordPress Code
  • I just joined Plurk last week after a couple of months holding back because honestly, I was turned off by the interface that looks like a spaghetti co...

  • Featured On John Chow dot Com
  • I was so excited yesterday. Imagine my excitement after my wife told me that John Chow featured my post on his blog. Yeah, the Dot Com Mogul himself d...

  • Upgrading To WordPress 2.2.1
  • I upgraded this blog to Wordpress 2.2.1. After upgrading, the sidebar was broken. I found out that the upgraded version has its own built-in Widget su...

  • WordPress Mobile Edition And Super Cache Plugin
  • Last November 2007, I installed the Wordpress Mobile Plugin on this blog to make this blog mobile-ready. However, I decided to disable that plugin whe...

  • How To Disable Directory Browsing On Your WordPress Blog Easily
  • If you have a self-hosted Wordpress blog, check the following links on your favorite browser: http://www.yourblog.com/wp-content/plugins/ http://w...

  • WordPress Blank Screen Of Death After Dreamhost Upgrade
  • Dreamhost is currently upgrading their servers and moving their customers to new servers gradually. Last week was my turn to move. One of the probl...

  • Finally Upgraded To WordPress 2.3.1
  • Yes, finally, I was able to upgrade this blog to Wordpress 2.3.1. It took me more than an hour to finish everything. Reinstalled some new plugin versi...

  • My First WordPress Theme
  • Remember my Kukote In A Jar blog in Blogspot? Here is what it looks like in the Web Archive. Well, I did not totally abandon that design, and one nigh...

  • How To Install SSH On Debian GNU/Linux PC
  • I recently installed Secure Shell or SSH on a Debian GNU/Linux PC so that I can configure and connect to it remotely using an SSH client. I am a ne...

  • Link Love For Theme Users
  • After one and a half month of releasing my first wordpress theme, it is downloaded 750+ times now. I am seeing some blogs using that theme now. Than...

  • Link Building Technique: Create and Share WordPress Themes
  • By giving Wordpress themes for free, you get a priceless value in return. Links. Links that will increase your Pagerank and search engine rankings. It...

  • Free Valentine’s Day WordPress Themes
  • Valentine's Day is just around the corner. In less than 2 weeks, the prices of flowers, chocolates and valentine cards will rise. Valentine text messa...

  • 5 Useless WordPress Plugins
  • These Wordpress plugins are useless in my opinion. They might be useful to you, but they do more harm than good to me, that's why I'm not using them. ...

  • This Blog Is Now Hosted On Dreamhost
  • If you see some Wordpress error messages last night on this blog, sorry about that. I made a simple html file saying that this blog is under maintena...



28 Responses to “Twit This WordPress Code”

  1. itot Says:

    aba okay to ah! sinubukan ko, gumana! try ko gumawa ng code pra naman sa blogspot.d gagana un php e.

  2. itot Says:

    may nakita na ako sa blogspot kaso dun lang pwede ilagay sa page element kasi di siya naappear kapag isinama mo un code sa template mismo. eto yun url http://twitthis.com/?type=image add mo na lang to para sa mga blogspot blogs

  3. Twit This Wordpress Code Says:

    [...] 24th, 2009 Twit This WordPress Code a simple php code made my Marhgil of Macuha.com. It is an alternative way of putting a twit this post button or lin after your [...]

  4. SELaplana Says:

    ma try ko nga din sa blog ko

  5. Ambo Says:

    Ok to matry nga. Thanks again Brother!

  6. McBilly Says:

    Haha. Galing galing! Thanks sa tip marh :)

  7. Dexter | Tech At Hand Dot Net Says:

    Ayus yan ah…

  8. Andrei Says:

    Lol i cant read any of those comments, what lanauge are those? looks like french

  9. Dexter | Tech At Hand Dot Net Says:

    When I install the code at first it did not work.. What I did is manually change the ( ” ) mark , I don’t know what happen since when i copied it it seems different.

    Maybe other will experience the same.. But it works now.. :)

  10. Eligio Says:

    ayos to ah, pede rin ilagay sa arcade. :D

  11. Add Twit This On Your RSS Feeds | Make Money Online Philippines | Macuha.com Says:

    [...] subscribe to my feeds via RSS reader or via e-mail if you want more updates. If you added the Twit This code on your blog, I think it’s also a good idea to put that same link on your RSS feed. Your RSS [...]

  12. Tweet This Post Without The Plugin | John Chow dot Com Says:

    [...] just be a simple matter of adding one line of code to the single.php file. Marhgil explained how he did it here. I made a couple changes to clean up the codes a little. <a rel=”nofollow” [...]

  13. Ron Says:

    Good job with the code snippet! Featured sa johnchow pa! :D

  14. Froi Says:

    Uy, maraming salamat for sharing this one.

  15. Featured On John Chow dot Com | Make Money Online Philippines | Macuha.com Says:

    [...] John Chow featured my post on his blog. Yeah, the Dot Com Mogul himself dedicated a post for the Twit This code that I [...]

  16. jsonvega Says:

    nice great awesome! thanks! eaufs!

  17. noel (work at home dad) Says:

    Thanks for the code!

    I’ve edited this and used a nice “tweet this” button I found on the net. Check out this sample

    http://noelbautista.com/how-to-use-a-free-ppc-spy-tool-ppcwebspy/

  18. Hardi Says:

    Hey thanks for the tip..

  19. Roming Says:

    Great tip! I’ll be adding it to my blog soon! More power!

  20. Twit This Wordpress Code from Marhgil | Blessings in Life Says:

    [...] have been wanting to put this Twit This WordPress Code of Marhgil for quite sometime since I read it in his blog and it is just now that I have found time [...]

  21. Tere Says:

    I just installed the code in my blog and it worked! Thanks for the code!

  22. Kenneth Says:

    Installed na din sa blog ko. Thanks! :-D

  23. Nhoel Says:

    Hi Marhgil,

    I hope you don’t mind me creating my version of “Twit This WordPress Code”.
    This uses an embedded swf file along with the dynamic link.

    See my post here: http://keywordspeak.com/2009/05/keywords-twit-this-wordpress-code/

    Thanks
    Nhoel of keywordspeak.com

  24. Menardconnect and Twitter | menardconnect.com Says:

    [...] finally, I’ve added the Twit This WordPress code courtesy of Marghil Macuha, the cute twitter bird image courtesy of  TheDesignSuperHero and [...]

  25. yimzwik | Make Money Online Says:

    I’ve been working from home for some time now and it really is possible to make a great income. In order to find something that is legitimate, you must first understand what you are looking for (e.g. work or business opportunity).

    Most online work requires you to have some sort of specialized technical skill sets. You should never pay to start an online job. Any site that requires you to pay to work is definitely a scam. On the other hand, if you are not technically qualified for most online jobs, then your best bet is starting your own home based business. Starting a business does require up front cost.

    The quickest way I know to make some extra cash is by selling stuff on ebay or searching craiglist for work- these are normally only short-term fixes. I’ve tried them both and lost interest very quickly.

  26. crisiboy Says:

    sir..im trying to do this one but when im starting to test it and click the “Twit This”, i encountered error 404. Hope you could help me with this..thank you so much.

  27. Crisiboy Says:

    sir..hindi po sya gumagana sa blog ko..can u help me out why..after ko ipost ung code..then nung itry ko iclick..eror 404 ang lumalabas..hayyyzzz

  28. Marhgil Says:

    @Crisiboy try mo copy paste muna sa notepad, then retype all the double quotes. nagkakaproblema kasi sa encoding.

Leave a Reply

By clicking the Submit Comment button, you hereby agree with my Comment Policy.




SEO Made Easy Free Download


© Macuha.com | Make Money Online | Privacy Policy | WordPress | LoseMyMind | 90.7 Love Radio