Skip to content

Share buttons

Click to tweet boxes: how to build them in WordPress

By Hannah Voss, Editor · Reviewed September 2026 · 3 min read

Quick answer

A click to tweet box is a highlighted quote with a link that opens X's post composer, pre-filled with the quote and your page address. You can build one with a plain link to the X web intent URL, so no plugin is required. Keep the quote under about 250 characters so the link and your handle fit within 280.

On this page
  1. What a click to tweet box is
  2. Build one with a plain link
  3. Counting characters
  4. Style it as part of the article
  5. Writing lines people actually post
  6. Questions

What a click to tweet box is

It is a pull quote with a call to action: "Post this". Clicking it opens the composer on X with the text filled in, and the reader can edit before posting. The pattern was popular enough that share plugins sold it as an add-on, including a MashShare Click to Tweet add-on whose screenshots are still linked from other sites.

  1. Write the line

    One sentence that stands alone without the article: a finding, a rule of thumb, a strong opinion.

  2. Encode it

    URL encode the text and your page address. Spaces become %20, and characters such as the ampersand must be encoded too.

  3. Build the URL

    https://twitter.com/intent/tweet?text={quote}&url={address}. Add &via={handle} if you want your account mentioned.

  4. Add it to the post

    Use a Quote or Pullquote block for the text and a Button or link underneath with the intent URL. Set it to open in a new tab.

  5. Test it

    Click it logged in and logged out, and check the character count in the composer.

Counting characters

PartCounts as
Each character of your quote1 (most scripts)
Any link, however long23
A via mentionlength of the handle plus "via @"
Maximum post length280

A quote of about 240 characters leaves room for the link and a short via mention. If your plugin truncates text automatically, check that it cuts at a word boundary rather than mid-word.

Style it as part of the article

The box should look like a quotation, not an advert. A left rule, slightly larger type, and a small text link are enough. Avoid network brand colours as backgrounds; they clash with most themes and read as sponsored.

Writing lines people actually post

  • Specific beats clever: numbers, named steps, clear claims.
  • One idea per box, and no more than two boxes per article.
  • Leave out hashtags unless your community uses one consistently.

Questions

Do I need a plugin for click to tweet?

No. A link to the X web intent URL with encoded text and address does the same job.

Does click to tweet still work now the service is called X?

Yes. The web intent URL still opens the post composer with your text filled in.

How long should a click to tweet quote be?

Under about 250 characters, so the link and any via mention fit within the 280 limit.

Share this guide

Hannah Voss, Editor. Checks every guide against a working WordPress install and the networks' current documentation. Last reviewed September 2026.

  1. Highlight to share: letting readers share selected textHighlight to share lets readers select a sentence and share it with a link back. How it works, when it helps, accessibility concerns, and a lightweight setup.3 min read
  2. How to add social share buttons to WordPressAdd social share buttons to WordPress with a plugin, a block, or plain links in your theme. Placement, networks, counts and the checks to run afterwards.4 min read
  3. Twitter cards on X: tags and testingSet up Twitter card tags so links to your WordPress posts show a large image on X: the summary_large_image card, fallbacks to Open Graph, sizes and testing.3 min read