In this post (with a video tutorial), I will show you how to create display a YouTube Subscribe Button with Subscriber Count on a WordPress post, page, or widget.
Final look:
Video Tutorial
Step by Step Guide
Overview
- Go to Google Developers page
- Find your channel ID
- Customize the setting
- Copy the code
- Paste the code
Step 1 – Go to Google Developers page
We will use the tool from Google Developers. It is beginner-friendly. Once you are on the page, we will need our channel ID. The channel ID can be found by going to your YouTube channel. It might look like a name or a random combination.
Step 2 – Find your channel ID
Your channel ID is your YouTube URL (see the video).
Step 3 – Customize the setting
Your channel ID is your YouTube URL (see the video).
Play with the setting till you get the configuration look that you like. I like the following setting:
Layout: Full
Theme: Default (white)
Subscriber count: Shown
Step 4 – Copy the code
Copy the code on the page (see the video tutorial).
Now we are going to move away from this page and go to our WordPress backend.
Step 5 – Paste the code Create either a new Post or Page
You can paste the code to either a new post, page, or a widget. When the latest WordPress update (as of February 2020), I can insert an option that says HTML. Now I just need to paste the code.
That is it! 🙂
TIPS
Tip 1 – Bookmark the Configure a Button page if you need to use it more than once and/or play with different configurations.
Tip 2 – If you are comfortable working with codes, you can copy and paste this code in a notebook like Evernote or something. Then just pull it up and edit the values instead of going to the page.
Tip 3 – If you are working with the codes directly, make sure to use the appropriate data-channel value.
If you are using your channel ID:
Change the value for data-channelid to your channel ID 😀
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UCDdYC231RFMVXPfxL07Gzyw" data-layout="full" data-count="default"></div>
If you are using your channel name, make sure to change “data-channelid” to “data-channel”.
I hope it is helpful. Have a great day. Bye.