• 0

Add Youtube Subscribe to Sharebar


Question

Posted · Report post

Anyone using google's Youtube channel subscribe button?

 

I believe this is pretty new (as of July 2013) so I haven't seen any 3rd party plugins that allow it in a separate widget like DMS's built in sharebar. 3rd party plugins only seem to allow it on posts or pages. I'd love to see the addition in the DMS sharebar section.

 

Google supplies this as the code to add the button:

 

<script src="https://apis.google.com/js/plusone.js"></script> 
<div class="g-ytsubscribe" data-channel="Your Channel Name Here">
</div>

 

Perhaps I could create a textbox with this code along with google+, twitter, facebook, and pinterest code. Are there any other options out there?

 

-brad-

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi,

 

I haven't heard of any plugins, but what you should probably do is:

 

1.  Add the script code to DMS Toolbar > Custom > Custom Scripts

2. Add the HTML i.e. <div class... to a MediaBox or TextBox.

 

This should work.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

That works. I'll have to see what I can do to get the alignment to match the others in the sharebar with a little CSS. Hopefully we'll see the youtube subscribe button in a future update to sharebar. Thanks for your help.

 

-brad-

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Brad,

 

If you're trying to style it, I'd suggest wrapping the <div they provided with another, using a unique class of your own, then applying CSS to that unique class.

Something like <div class="my-g-y"><div class="g-ytsubscribe" data-channel="Your Channel Name Here"></div></div>

 

Then, you can set CSS like:

.my-g-y {color: red;}

 

(that's just for an example).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now