Design a site like this with WordPress.com
Get started

How to add a Follow Button in between the content of your WordPress blog

Do you want to add a follow button in between the text of your content? In this post I will tell you exactly how to do this with only a few lines of HTML. Just copy the code below and change the URL. When adding the HTML code to your blog, make sure to add it to the HTML block, and not directly to the ‘Paragraph’ block which opens by default.

HTML code for the follow button with blog name and follower count:

<a class="wordpress-follow-button" href="https:// debbyseo.wordpress.com">Follow SEO San Francisco on WordPress.com</a> (function(d){var f = d.getElementsByTagName(‘SCRIPT’)[0], p = d.createElement(‘SCRIPT’);p.type = ‘text/javascript’;p.async = true;p.src = ‘//widgets.wp.com/platform.js’;f.parentNode.insertBefore(p,f);}(document));

This is what the button looks like:

HTML Code for the Follow button with blog name no follower count:

<a class="wordpress-follow-button" href="https:// debbyseo.wordpress.com">Follow SEO San Francisco on WordPress.com</a> (function(d){var f = d.getElementsByTagName(‘SCRIPT’)[0], p = d.createElement(‘SCRIPT’);p.type = ‘text/javascript’;p.async = true;p.src = ‘//widgets.wp.com/platform.js’;f.parentNode.insertBefore(p,f);}(document));

HTML code for the Follow button without blog name but with Follower count:

<a class="wordpress-follow-button" href="https:// debbyseo.wordpress.com">Follow SEO San Francisco on WordPress.com</a> (function(d){var f = d.getElementsByTagName(‘SCRIPT’)[0], p = d.createElement(‘SCRIPT’);p.type = ‘text/javascript’;p.async = true;p.src = ‘//widgets.wp.com/platform.js’;f.parentNode.insertBefore(p,f);}(document));

HTML code for the follow button without blog name and no follower count:

<a class="wordpress-follow-button" href="https:// debbyseo.wordpress.com">Follow SEO San Francisco on WordPress.com</a> (function(d){var f = d.getElementsByTagName(‘SCRIPT’)[0], p = d.createElement(‘SCRIPT’);p.type = ‘text/javascript’;p.async = true;p.src = ‘//widgets.wp.com/platform.js’;f.parentNode.insertBefore(p,f);}(document));

I hope this post will be of use to you. You can also visit the follow button creator as can be found on the WordPress developers website. Have fun!

Published by Debby Winter

I will accompany you with the creation of a successful and well-ranking website that is deeply meaningful and exquisite on all levels. Learn SEO marketing with free tools, SEO optimization and software reviews. Offering affordable SEO services for small business in San Francisco, California, and at an international level.

14 thoughts on “How to add a Follow Button in between the content of your WordPress blog

  1. Reusable blocks are great I should really use the them more often myself! I currently have them configured to quickly add links in between content of my blog but adding HTML code is a wonderful idea! Thanks for your comment!

    Liked by 2 people

  2. Unfortunately, I’ve not been able to get any of the codes to work for me, Debby. I’m inserting the code into the HTML block, but am only seeing the code when I preview the post. I must be doing something wrong. Any help with this would be appreciated.

    Liked by 1 person

  3. Did you try using the link to the HTML code generator at the end of the post? If that didn’t work it could also be that you need to upgrade your WordPress plan before you are allowed to use HTML on your page. If the latter is the case I recommend that you consider migrating to a self-hosted WordPress solution. There are hosting packages for WordPress blogs starting at less than $3/mo that are much faster than the WordPress plans, and you are additionally able to install any plugin you like. If you would like me to help you with this just let me know πŸ˜‰

    Like

  4. Hi Debby, yes, I tried the code generator, but it still did not work, so I got in touch with the Happiness Engineers at WordPress.

    They got back to me and told me what the problem was. Here’s what they said.

    “I noticed that you are trying to add an HTML code which includes JavaScript. I also found that you have a Business plan subscription that supports it however you haven’t installed any third-party plugin or themes yet, that triggers some additional features to be enabled on the site. And that includes support for the JavaScript code on pages and posts.

    You simply need to go to My site > Plugins and install any random plugin for this purpose. You can remove the plugin later. Once you have done that try adding the HTML code again and it will work just fine.”

    So it seems to make it work, you must have some third-party plugins or themes installed on your blog to make the JavaScript function.

    Unfortunately, as a WordPress.com user, when you install third-party plugins, you lose some the features WordPress offers, e.g. the blogs I follow widget, the default follows button, etc. As I don’t want to lose any of these features, for now, I don’t want to install any third-party plugins. This may change in the future, but for now, I’m happy with what I have.

    Liked by 1 person

  5. Hi Hugh, thanks for forwarding the reply from WordPress. The first thing I do when setting up a new WordPress blog is adding my favorite plugins, so I was surprised to hear that the code above didn’t work with an unmodified WordPress business package. I understand you may not be ready yet to apply the changes. Personally I find that benefits from plugins such as WP super cache, Yoast SEO and Internal Link Juicer outweigh the additional features WordPress has to offer, but obviously this is just my opinion. Thanks again for sharing this valuable information.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: