Guides/Grow your audience/Social tools/Add an X (Twitter) follow button

Add an X (Twitter) follow button

Last reviewed on November 4, 2025

You can display an interactive button that allows your website visitors to follow you on X (formerly known as Twitter) in one click. Here is an example:

Add an X follow button

You can encourage visitors to follow you on X (formerly known as Twitter) by adding an X Follow Button to any page of your site. The steps to take are different depending on if your site has plugins installed or not:

Sites without plugins

Screenshot of a WordPress editor displaying the shortcode input for an X Follow button with the text 'X follow button' and example shortcode '<a href="https://twitter.com/wordpressdotcom" class="twitter-follow-button" data-show-count="false">Follow @wordpressdotcom</a>'.

To add an X Follow button, copy and paste one of the following shortcodes into a Shortcode block in the WordPress editor.

Be sure to use your own Twitter username in place of wordpressdotcom in the following shortcodes.

Display a follow button with your username:

[twitter-follow screen_name='wordpressdotcom']

Display a follow button without your username:

[twitter-follow screen_name='wordpressdotcom' show_screen_name='no']

Sites with plugins

If your site has plugins installed or hosting access activated, take the following steps:

1. Open the X/Twitter Publish tool.

2. Enter your X profile link and press Enter on your keyboard.

Screenshot of the X Publish tool interface, featuring a text input field asking, 'What would you like to embed?' with 'wordpressdotcom' pre-filled.

3. Choose your preferred layout.

A screenshot of the X (formerly Twitter) button selection interface, showing options for Follow, Mention, and Hashtag buttons with descriptions.

4. Click the “Copy code” button.

A webpage displaying the X (formerly Twitter) Publish tool with information on embedding X content and a 'Copy Code' button.

5. Edit your site and insert a Custom HTML block in the position you wish to display the button.

6. Paste the code into the block.

Screenshot of a WordPress editor interface showing a Custom HTML block with code to add an X Follow button.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!