X (formerly Twitter) Follow @username button on WordPress Sidebar

Create an X Follow @username button on the WordPress Sidebar – this method is for Blogs that have Plugins. My Blog is self hosted at Hostinger so it has the needed Plugins option.

X/ Publish tool

When Elon Musk stole Twitter from the Progressives & the Democratic party’s Federal Govt puppets, my previous Twitter widget stopped working soon after. I had to use the X/ Publish tool to embed individual tweets onto the sidebar—since the Twitter scroll widget no longer worked.

Maybe there is another way to create an X/Twitter scroll widget, but as a novice I haven’t been able to do it or find out how. Perhaps the Block Editor has a Twitter block that offers it, but I only use the Classic Editor.

Also, I don’t want the sidebar to be filled with tweets or just new tweets, i.e., I want to select the tweets to be displayed on the sidebar. I use part of Method 2 – but select “Embedded Post” instead of “Embedded Timeline”.

Whilst working with the X/ Publish tool I had also noticed the “X Buttons” section, and decided to try it out recently. I had used Twitter for a long time, but never cared for it until Musk took over. Have an X subscription now, but am still a novice at using it. X/ Publish has other options also, but I haven’t tried the others yet.

Embed an X Follow button

Open the X/ Publish tool and type in your username—hit enter:

Select X Buttons option:

Then select Follow Button option:

That brings up a preview & the Copy Code window:

Copied! with info:

Here’s the actual code that was Copied:

<a href=”https://twitter.com/KarmiTux?ref_src=twsrc%5Etfw” class=”twitter-follow-button” data-show-count=”false”>Follow @KarmiTux</a><script async src=”https://platform.twitter.com/widgets.js” charset=”utf-8″></script>

Then go to your blog’s Homepage and click on the Customize option:

Select Widgets:

Select Blog Sidebar:

Click Add a Widget:

Select Block widget:

Paste the Code that was copied into Block HTML:

Then click Publish button and it should look like this, but with your username:


As mentioned earlier, I am a novice at self hosting and using X (formerly Twitter), but am slowing learning how to use CSS codes, and other tools like X/ Publish. Most info can be found with an internet search – it has taken novice me about 16-months to get my blog to a point where I love the theme.

The old theme that I had used at WordPress.com didn’t work the same at WordPress.org, so I purchased the premium Multipurpose Blog Pro theme, and started from there. Self hosting takes a little work, but it is well worth it for me.

The new X Follow me button now gives me the options for X that I wanted, i.e., 1 or 2 tweets on the sidebar, and the X Follow button to make it easier for any interested viewer.


Translate »