• I have a shortcode which calls up a small script to embed a subscribe to YouTube Button. It is working on all my pages, but not on my Home / Main page.

    The problem is that the main page is somehow catching this code and applying it to the button, specifically the padding-top is causing problems, it shows up as a large 150% of white space on my site.

    catchkathmandu.fitvids.min.js
    t.attr("id",s)}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",i*100+"%");

    Problem example:
    www.futuragamer.com (buttons in posts above youtube videos)

    Non Problem example:
    https://www.futuragamer.com/category/android/puzzle/painful-puzzle/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Catch Themes

    (@catchthemes)

    @ddxv: Can you try adding in following css in “Appearance => Theme Options => Custom CSS” box.
    #___ytsubscribe_5 #fluid-width-video-wrapper { padding-top: 0 !important; }

    Thread Starter ddxv

    (@ddxv)

    @ddxv: Can you try adding in following css in “Appearance => Theme Options => Custom CSS” box.
    #___ytsubscribe_5 #fluid-width-video-wrapper { padding-top: 0 !important; }

    This CSS is being applied by the catchkathmandu.fitvids.min.js file, not style.css so that doesn’t work.

    The problem is the home page is incorrectly applying fitVids to this function which I added to shortcodes.php:

    function SubscribeToYouTubeChannel() {
    return '<script src="https://apis.google.com/js/platform.js"></script>
    <div class="g-ytsubscribe" data-channelid="UCn5qG4IE78P8pzlE6OG-WYg" data-layout="default" data-count="default"></div>';
    }
    add_shortcode('youtubefollow', 'SubscribeToYouTubeChannel');

    I think the key here, is that it’s only happening on the front page. Other pages are using the g-ytsubscribe class.

    My question is, how can I stop fitVids from applying CSS to my button on the home page?

    Theme Author Catch Themes

    (@catchthemes)

    @ddxv: Did you fixed in as when I check in your homepage now it’s showing fine.

    Thread Starter ddxv

    (@ddxv)

    No, I haven’t fixed it, I just haven’t included the youtube subscribe button in the last few posts.

    Theme Author Catch Themes

    (@catchthemes)

    Your server is down to check in.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘YouTube iFrame Being Applied to Wrong Item’ is closed to new replies.