WordPress.org

Forums

Catch Kathmandu
YouTube iFrame Being Applied to Wrong Item (6 posts)

  1. ddxv
    Member
    Posted 1 year ago #

    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:
    http://www.futuragamer.com/category/android/puzzle/painful-puzzle/

  2. Catch Themes
    Member
    Theme Author

    Posted 1 year ago #

    @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; }

  3. ddxv
    Member
    Posted 1 year ago #

    @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?

  4. Catch Themes
    Member
    Theme Author

    Posted 1 year ago #

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

  5. ddxv
    Member
    Posted 1 year ago #

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

  6. Catch Themes
    Member
    Theme Author

    Posted 1 year ago #

    Your server is down to check in.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic