First thing you need to do is install and activate the Better Click To Tweetplugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, the plugin will add a new menu item labeled ‘Better Click to Tweet’ to your WordPress admin bar. Clicking on it will take you to plugin’s settings page.
On the settings page, first you need to provide your Twitter handle. It will be used inside the tweets like this ‘via @wpbeginner’. This will help you see the conversations and tweets from your Twitter account.
Next, if you want to use the your own custom short URLs, then check the box next to ‘Use short URL’ option.
Don’t forget to click on the save changes button to store your settings.
Adding a Click to Tweet Box in WordPress Posts
Now that you have setup the plugin, you are ready to add click to tweet boxes and quotes to your WordPress posts and pages.
Head over to create a new post or edit an existing one.
The plugin comes with a simple shortcode to add click to tweet boxes anywhere in your posts or pages. Simply add the shortcode like this:
[bctt tweet="Text of the tweet goes here"]
Here is how it would look on your website.
The plugin will automatically add a link back to your post as well as your Twitter handle to the post when a user clicks to tweet.
The shortcode comes with some extra parameters to help you customize the tweet box.
Loading...
For example, you would notice that the linked ‘click to tweet’ button is not a nofollow link. You can change that to a nofollow link by adding a nofollow attribute to the shortcode like this:
[bctt tweet="Text of the tweet goes here" nofollow"yes"]
You can also change the anchor text of the button by adding prompt parameter to the shortcode like this:
[bctt tweet="Text of the tweet goes here" prompt="tell a friend"]
If for some reason you don’t want to include the post URL or your Twitter handle into the tweet, then the plugin also allows you to do that as well.
You will just need to add your url and via parameters to the shortcode, like this:
[bctt tweet="Text of the tweet goes here" url="no" via="no"]
Changing Appearance of Click to Tweet Box
This plugin actually comes with a premium addon that has more styles that you can use for your click to tweet box.
It also allows you to easily add custom rules using CSS.
Simply connect to your WordPress site using an FTP client and go to /wp-content/plugins/better-click-to-tweet/assets/css/ folder.
Now locate the
bcttstyle.css
file and download it to your computer.
Next, you need to go to /wp-content/uploads/ folder on your website and then upload the
bcttstyle.css
file from your computer.
You can now edit this file and any changes you make will be reflected in all click to tweet boxes on your website.
Another way to do that is by copying the contents of the plugin’s CSS file and pasting them as custom CSS in your theme using the customizer. This way you can easily edit the CSS more easily with live preview.
We hope this article, helped you learn how to easily add click to tweet box to your WordPress posts and pages. You may also want to see our list of most wanted Twitter hacks and plugins for WordPress.
0 Comments
Post a Comment