FANDOM


YouTubeButton imports the platform.js script from Google, which enables the use of YouTube subscribe buttons.

Usage

dev:YouTubeButton/code.js
  • To embed a subscribe button, use the following HTML:
<div class="g-ytsubscribe" data-channel="ChannelName" data-layout="default" data-count="default"></div>
  • Replace ChannelName with a YouTuber's channel name

Example

Code
<div class="g-ytsubscribe" data-channel="wikia" data-layout="default" data-count="default"></div>


Code
<div class="g-ytsubscribe" data-channel="wikia" data-layout="full" data-count="default"></div>

Bugs

  • 26th June 2018 (User: Warren Woodhouse): I’ve noticed that in the original Google Documentation for YouTube Subscribe Button offers 2 separate themes — light or dark. I’ve added the extra line of data-theme=“dark” in the same code as mentioned above on my Wiki’s Homepage and the Button didn’t display at all. I believe this is the only known issue I’ve experienced with this. - Link To Issue

External links

Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+