How to Add Twitter Buttons to Your WordPress Blog

Date: January 29, 2012 • Categories: WordPress • Tags: ,


Providing social media buttons to your Web site is a good idea as you can expect to promote your contents efficiently through social media networks. Indeed, there are a lot of Web sites and blogs provide a Facebook like button, a Twitter share button and other social media buttons to expose their contents though Facebook or Twitter. If you use WordPress for your Web site, there already are a lot of WordPress plugins available to add Twitter share buttons. But even without using such plugins, it is not that difficult to add social media buttons to your WordPress blog. This time, I would like to explain how to add a Twitter button to your WordPress pages.

Twitter provide a dedicated page for those who wish to add various Twitter buttons to their own Web site or blog. You only have to access to that page to get a source code to implement to your Web site. Here is a step-by-step guide how to do that.

Steps to Add a Twitter Button to Your WordPress Web Site

  1. Navigate to a Web page titled Twitter Buttons provided by Twitter.
  2. Select a button under the Choose a button section to implement to your Web site.
  3. Configure options accordingly based on your needs.
  4. Obtain a source code under the Preview and code section.
  5. Embed that source code into any of your Web pages.

An Example: This is What I Did

If you would like to add the following Twitter share button under the page title of every single page of your WordPress Web site, you will have to do:

  1. Navigate to a Web page titled Twitter Buttons provided by Twitter.
  2. Select the Share a link option under the Choose a button section.
  3. Copy a source code under the Preview and code section. It is going to be something like this:
  4. Login to your WordPress Web site as an administrator.
  5. Click the Editor menu under the Appearance section.
  6. Click the Single Posts under the Template section on the right hand side of the screen.
  7. Find a line which contains <?php the_title(); ?>.
  8. Paste the source code obtained at Step 3 right after the code mentioned above.
  9. Click the Update the File button.

Note

If you are using a WordPress theme with no Single Posts, please check Main Index Template instead. Then find <?php the_title(); ?> right after this tag: is_single().

 

If you find this blog post useful, please share it with others.

 

Leave a Reply

http://kotodamastyle.com/blog/2012/01/how-to-add-twitter-buttons-to-your-wordpress-blog/trackback/
Recent Comments