How to Code Your WordPress Blog to Share Content with Twitter

You have just spent hours researching and writing the perfect blog post on a topic meant to blow your readers’ minds. It is only natural that you would want them to share your newly polished pearl on Twitter to send new readers back to your blog, right?

This post will show you a simple way to integrate snippets of text from your blog post to create automatic tweets that your readers can share with ease.

One of the easiest ways to do it is to sign up for a free account at ClickToTweet. By setting up a free account, you can simply login to the ClickToTweet website any time that you need a snippet for your article. You alo have he benefit of being able to review the stats on who has clicked on your link. That way, you can see how effective your click-to-tweet snippet is, helping you to know what is the most appealing to your readers.

But, what if you don’t want a third party application? Are you afraid it won’t always be free? Fortunately, you can do it yourself, with the following steps.

Here’s how:

  1. Go to the WordPress dashboard and select the post you want to edit.
  2. Determine which snippets of text from your post to make shareable on Twitter.
  3. Select the “Text” view toggle so that you can edit the HTML code.
  4. Find the snippet of text you want to turn into a tweet.
  5. Cut and paste the HTML code (shown below) directly after the snippet of text you want to share.(<strong><a href=”https://twitter.com/intent/tweet?text=Type your snippet text from your blog here. Don’t forget to stay within the 140-character limit! #howto” target=”_blank”>Tweet this!</a></strong></span>)
  6. Make sure to exchange your post’s snippet text with the text shown in BOLD/ITALIC.
  7. Add hashtags and/or a “shortlink” URL within your tweet (to drive traffic back to your blog post.)
  8. Toggle back to the “Visual” view to check that the “Tweet this!” text shows up as a hyperlink.
  9. Click on “Preview Changes” to test the newly created hyperlink. If it works correctly, a new tab should pop-up with your text snippet preloaded and ready to tweet. If not, return to step 5 and try again.
  10. Feel free to make edits to your snippet as needed within the 140-character limit.
  11. If you are happy with your prospective tweet, you may “save draft” or “update” your post for publishing.

Note: If you prefer to use the HTML code provided by Twitter, visit this Twitter Support article for more information.

You can play around with the code and add images or anything else to highlight the code. Some bloggers create an image that includes the text of the quote in the image, to draw attention to the “button.” Others leave the code as simple texts within the articles to make it easy to read the article and tweet at the same time.

So, now that you know how to integrate snippets of your blog content with Twitter, get busy coding and track how much traffic Twitter drives back to your blog. Just remember to make your content relevant and to address a need that your readers will find too compelling to keep to themselves.

Written by
Deborah Anderson
Join the discussion

This site uses Akismet to reduce spam. Learn how your comment data is processed.