What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Add a Twitter Follow Button in WordPress?

How to Add a Twitter Follow Button in WordPress?

This tutorial introduces the detailed steps about how to add a twitter follow button in WordPress websites. At the end of article, readers can learn about the method to combine WordPress with Twitter to promote them interactively.

WordPress is the most famous blogging system and content management system welcomed by more than 60 million websites. Twitter is an online social networking and microblogging service that gains 500+ million registered users who posted 340 million tweets per day. Both WordPress and Twitter are widely used by users. Why not combine them together to marketing interactively?

Frankly speaking, you can make it by adding a Twitter follow button in WordPress websites. Twitter follow button is a lightweight widget used to allows users to follow your Twitter account by easily clicking the button. Generally, you need to add a link to your Twitter page so that users can be directed to your Twitter profile, and click follow button to follow you. By adding a Follow button on your WordPress site, they can follow you directly by click this button easily. Thereby, this way increases the convenience and saves your users a few clicks.

Add Twitter Follow Button to WordPress

In below, we carefully introduce the steps of adding a Twitter follow button in WordPress websites. The process is very easy to handle, and you can completely worry free to follow it.

Generate A Follow Button Code

Go to the Twitter button page, choose a button as Follow and generate a code. Or, you can simply copy the below code.

<a href="http://twitter.com/whatswp" class="twitter-follow-button" data-show-count="true">Follow @WordPressHostingReview</a>

<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>

However, if you have implemented the Tweet button on your website already, you don’t need the JavaScript portion. You can just paste the first line into your website.

<a href="http://twitter.com/whatswp" class="twitter-follow-button" data-show-count="true">Follow @WordPressHostingReview</a>

Paste the Code Into WordPress Site

Actually, you can paste the code in your WordPress theme anywhere as you like. The easiest and most widely used way is to paste it into a widget so that it can appear in the sidebar or footer. You can make this easily. Log into WordPress dashboard, go to Appearance, select Widgets and add a text widget to your side bar. At last, you need to paste the code above into it. Look at the screenshot as the following.

Add Twitter Follow Button

On the other hand, you can achieve this function by adding a plugin. However, in my personal mind, it’s not necessary at all because the thing is too simple.

You are done if you don’t mind the button appearance. However, if you want to beautify it or customize it to match your website style, you can learn about the below part.

Customize the Coding

One of the greatest benefits of adding the button using the JavaScript is that you can make some modifications with the help of data attributes.

  • Follower Count Display – You can decide this aspect using the attribute of “data-show-count = ”. The true property means you want to display the count, and the false property means you want to hide it.
  • Size – The attribute deciding button size is “data-size = ”. Note that you can only choose between medium (the default option) and large.
  • Width – You can decide this based on your website design. The attribute is “data-width = ”.
  • Alignment – To decide this aspect, you can use the attribute of “data-align = ”.
  • User Name Display – By default, the Follow Button displays your user name or website name, but you can disable it using “data-show-screen-name = false”.

These are the most basic options for customizing the Follow Button. In fact, you can also decide whether to use an IFRAME or whether to display the function of Twitter tailoring of your content. You can check the coding stuff from this page.

Author

Joyce is a professional writer & SEOer who loves trying new things and sharing the experience through blogging. She loves clean design, playing with different WordPress themes, SEO, etc. Now she is very struggle with purchasing a bubbling apartment in downtown. You can help her by clicking our ADs or making a purchase via our links ;-)

Close

Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!