|
|
|
|
How to add Tweet button to Wordpress theme
Twitter provides you with a number of different button integrations. Today, you will learn how to generate an official Tweet button with tweet counts, html code and add it to your Wordpress theme.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.
|
|
|
First, thing's first, let's generate a Tweet button embed code.
Visit the Twitter Buttons web page.
Choose the Share a link Twitter button (see picture).
|
|
|
2.
|
|
|
To show the number of shares, that is the number of people that clicked your Tweet button, enable the Show count option.
If you own or run a Twitter page related to your Wordpress website, then enter the name of that page into the Via field (see picture).
|
|
|
3.
|
|
|
You can also choose a Large button and the language.
|
|
|
4.
|
|
|
Now we need to fetch the Twitter share button html code so you will be able to embed it onto your Wordpress website.
Click in the field displaying the code and copy it to clipboard.
Ctrl (Cmd for Mac) + C or right-click and copy.
|
|
|
5.
|
|
|
Now got to the home folder of the Wordpress them you are using.
I'm using a Solo theme, so I'm need to go to wp-content/themes/solo folder using a ftp client.
Also recommended for you:
|
|
|
6.
|
|
|
Find the index.php file and open it in a text/html editor like Notepad++ or Dreamweaver.
Also recommended for you:
|
|
|
7.
|
|
|
I want to place the Twitter share button right bellow the post title, that's why I need to paste the code between the post div and content (see picture).
Usually right-click + V or Ctrl (Cmd for Mac) + V to paste the previously copied html code.
Save the index.php file and upload it back to the same folder you downloaded it from.
If you are using an online html editor, than don't forget to save it as well.
|
|
|
8.
|
|
|
And here it is, your very own Tweet share button.
In case of any questions, please do not hesitate and drop me a comment.
Also recommended for you:
|
|
|
|
|
|
|
|
|
|