Create a “Send to Twitter” button for your WordPress blog


Do you use Twitter on a daily basis? If so, you know how good Twitter is for sharing with everyone what you find interesting around the web. Here’s a great way to give your readers a chance to share your Wordpress blog posts with their friends and bring more visitors to you.

This is a very simple Worpress hack where you will create a link to Twitter with a status parameter. We will use the function the_permalink() to get the page URL:

<a href="http://twitter.com/home?status=Currently reading <?php the_permalink();?>"
title="Click to send this page to Twitter!" target="_blank">Share on Twitter</a>

You can add this line of code to your single post file (single.php) in order to display it on each individual post and also add it to your main index template (index.php) to display under each post title in the blog’s index page.

Source: How to: Create a “Send this to Twitter” button.

Enjoy!

Share:
  • Twitter
  • Facebook
  • del.icio.us
  • LinkedIn
  • Technorati
  • Digg
  • NewsVine
  • Mixx
  • Google Bookmarks
  • Yahoo! Buzz
  • Live
  • Print
  • Add to favorites

Back to top ↑

Leave a comment

Name: (Required)

E-mail: (Required)

Website:

Comment:


Spam protection:
What is the sum of 3 + 4 ?