This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

How to disable related videos on YouTube videos in sliders

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #3908
    Jason Bobich
    Keymaster
    #3943
    joejacobson
    Member

    Thanks, I’ll give this a try.

    #3949
    joejacobson
    Member

    I just tried this plugin, but apparently, it doesn’t work now with youtube. See below comments from plugin page:
    —————————————————————————

    3.5 isn’t the issue… the plugin simply doesn’t work, because Youtube changed their system.

    You need to replace the ampersands with question marks and remove “?feature=oembed” entirely. I’m not sure if there’s a downside to doing this… all I know is that it works.

    Here’s the bad code on line 33:
    return str_replace(‘&feature=oembed’, ‘&feature=oembed&rel=0’, $data);

    And here’s what it should be:
    return str_replace(‘?feature=oembed’, ‘?rel=0’, $data);

    However, if you’re like me and use other embeds, like Flickr, you’ll want to make this adjustment for Youtube embeds only. So here’s what I changed line 33 to:
    $data = preg_replace(‘/(youtube.com.*)(?feature=oembed)(.*)/’, ‘$1?rel=0$3’, $data);
    return $data;

    #3956
    Jason Bobich
    Keymaster

    Keep in mind that none of this has anything to do with the theme. We’re just talking about filtering how WordPress inserts YouTube videos. Give the instructions a try. Seems pretty straight forward.

    #3957
    Jason Bobich
    Keymaster
    #4011
    joejacobson
    Member

    Thanks for tweeting the author.

    #9239
    slatronica
    Participant

    It looks like the plugin has been updated as I just installed and it worked without any modifications. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.