Automatically Add Subscribe Link to Each YouTube Embed Video in WordPress

Best WordPress Hosting

Many of you already know about my tech blog Techlomedia and Techlomedia Gadgets. For these, I also make videos of gadgets and embed in articles. Many times, I also embed other people’s videos in the articles. Recently, I saw that few big websites are using a kind of plugin to add Subscribe button just below the video and it really helps in converting viewers into Subscribers.

I thought to do the same and started searching for plugins. I found one but it didn’t work. So, I thought to code it by myself and it was a simple less than 5 minutes of effort to achieve the desired result.

See the featured image to know how it looks on my website.

If you also want to add something similar, I am adding the code snippet below.

Here, you only need to replace the data-channel with the username of your channel. You can also make changes in the style thing to customize it.

Even if the code is written in javascript, I have not tested it on any other platform except WordPress. It should work on other platforms as well. You only need to check the video container selector. video-container is the primary selector I used. If your platform is using something else, change it accordingly.

I have not yet made any plugin for this due to lack of time and I am not sure how many of you are really interested in that. If you want me to write a WordPress plugin for the same, you can comment below. I will surely consider of writing a plugin for this.

advertisement

About The Author

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Receive fresh web design resources and SEO tips in your email by our weekly newsletter

You have Successfully Subscribed!