Web Design & Development

Remove Related Videos From YouTube Videos

You can remove those pesky automatic related videos from all YouTube videos by using the code here and entering it into:

Options > Integration > Head Code

<script type="text/javascript">
(function($) {
  $(window).load(function() {
    $('.fluid-width-video-wrapper').each(function() {
    var src = $(this).find('iframe').attr('src');
    $(this).find('iframe').attr('src', src + '&rel=0&modestbranding=1&autoplay=0&showinfo=0&controls=2&iv_load_policy=3');

// Remove the // comment tags preceeding <script> and </script> after pasting code in the proper Divi settings area.

// YouTube Parameters
// "rel=0" Removes related videos at end
// "modestbranding=1" Remove YT logo from control bar
// "autoplay=0" Disable autoplay, =1 to Enable
// "showinfo=0" Strips video title
// "controls=2" Show player controls
// "iv_load_policy=3" Removes video annotations
// "color=red" Not listed in above code. Changes the progress bar color. ONLY 'red' or 'white' values are currently available.

// Personalized watermark will only show when 'modestbranding' is not enabled and 'iv_load_policy' values is removed.

Find the full code link: codepen.io/vextris/pen/remxyQ
Look through more information about this code: divi.tutsdirectory.com/listing/how-to-remove-youtube-related-videos-in-divi

See our featured website design work

Check out some of the beautiful websites we’ve built for over 2,000 clients.

We offer WordPress support & maintenance

Shake the stress of ongoing maintenance with plans supported by our team of WordPress experts.

Related articles