[et_pb_section fb_built=”1″ _builder_version=”4.7.7″ _module_preset=”default” custom_padding=”1px||4px|||”][et_pb_row _builder_version=”4.7.7″ _module_preset=”default” custom_padding=”2px|||||”][et_pb_column type=”4_4″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” header_2_font=”Quicksand|600|||on||||” custom_margin=”||-1px|||” custom_padding=”5px|||||”]

We are dividing this article into three sections.

[/et_pb_text][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” header_2_font=”Quicksand|600|||on||||” header_3_font=”Quicksand|600|||on||||” header_3_text_color=”#e02b20″ custom_margin=”||-1px|||” custom_padding=”18px|||||”]

1. How and why it Occurs

2. What is the Solution

3. How To Fix For Divi

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”4.7.7″ _module_preset=”default”][et_pb_column type=”4_4″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text module_id=”how-and-why” _builder_version=”4.7.7″ _module_preset=”default” header_2_font=”Quicksand|600|||on||||” custom_margin=”||-1px|||”]

How and why it Occurs

[/et_pb_text][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″]

There is no doubt that Divi is one of the best WordPress themes available on the market today. Most of the users are using this themes and also recommend to others as well.

Even We TrustyPlugins are using the Divi theme and our hundred of Clients are using this awesome theme. Divi comes with unique and awesome page builder features. It has many in built modules to build the layout structure for your website.

Many of the Divi users use the Divi Video Module to embed YouTube videos on the page and want to hide suggested YouTube videos in Divi’s Video Module.

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row column_structure=”1_2,1_2″ make_equal=”on” _builder_version=”4.7.7″ _module_preset=”default” custom_padding=”0px|||||”][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default” background_color=”#f7f7f7″][et_pb_video src=”https://www.youtube.com/watch?v=YBHQ7HR_jcs&t=26s” _builder_version=”4.7.7″ _module_preset=”default” custom_margin=”||4px|||”][/et_pb_video][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|600|||on||||” header_2_font=”Quicksand|600|||||||” header_2_text_color=”#e02b20″ text_orientation=”center”]

This Embed Video Is ending with some suggested Videos

[/et_pb_text][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em”]

But In this video module if you embed directly YouTube video then our Clients/Users was facing a issue regarding suggested videos that will popping up when YouTube video end because its default behavior of YouTube to show these suggested videos at the end of video. So generally not everyone wants to show that out of the focus content. Site admin would not distract the valuable user with that YouTube videos. Even their suggested videos comes from other YouTube Channels means these suggested videos are not required for many of the users. So we decided to comes up with the solution for that type of users.

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”4.7.7″ _module_preset=”default”][et_pb_column type=”4_4″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text module_id=”how-solution-works” _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″ header_2_font=”Quicksand|600|||on||||”]

How Solution Works

First of all there is no solution to hide suggested videos by Divi till the current Update.

We read many articles/threads related to this topic but no-one comes with the right solution.

So Official YouTube provides the solution if we use any custom script or YouTube API to integrate that embed video. You can see the official YouTube API player’s Parameter to understand the hack.

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”4.7.7″ _module_preset=”default”][et_pb_column type=”4_4″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text module_id=”fix-for-divi” _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″ header_2_font=”Quicksand|600|||on||||”]

How To Fix for Divi

So At the end , We all need a fix for the divi’s Video Module. So to do this we need to make that happen with custom javascript/jQuery code. As you read the documentation on Official YouTube API Parameters. We need to add ?rel=0 parameter at end of the embed url.

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row column_structure=”1_2,1_2″ make_equal=”on” _builder_version=”4.7.7″ _module_preset=”default”][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″ header_2_font=”Quicksand|600|||on||||”]

Do IT Step by Step

Step 1: First Of all you need to give a unique ID to Divi’s Video Module. To do this you need to go to your Video Module settings>Advanced tab>CSS Classes & IDs toggle and paste“trusty_hide_suggested” into the css ID field.

Step 2: Go to Divi>Theme Options>Integrations and add following code to the < head > of your site.

[/et_pb_text][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_image src=”https://staging.trustyplugins.com/wp-content/uploads/2020/12/Untitled-1-1.jpg” alt=”Hide suggested youtube videos in divi’s Video Module” title_text=”Untitled-1″ _builder_version=”4.7.7″ _module_preset=”default”][/et_pb_image][/et_pb_column][/et_pb_row][et_pb_row column_structure=”1_2,1_2″ make_equal=”on” _builder_version=”4.7.7″ _module_preset=”default”][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″ header_2_font=”Quicksand|600|||on||||” background_color=”#f7f7f7″ custom_padding=”20px||20px|50px|false|false”]

jQuery(function($){
setTimeout(function(){
var src=$('#trusty_hide_suggested iframe').attr("src");
var new_src=src+"&rel=0"
$('#trusty_hide_suggested iframe').attr("src",new_src);
},600);
}); 

[/et_pb_text][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_video src=”https://www.youtube.com/watch?v=YBHQ7HR_jcs&t=26s” module_id=”trusty_hide_suggested” _builder_version=”4.7.7″ _module_preset=”default” custom_margin=”||4px|||”][/et_pb_video][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|600|||on||||” header_2_font=”Quicksand|600|||||||” header_2_text_color=”#e02b20″ text_orientation=”center”]

Embed Video After Implementing the Code

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”4.7.7″ _module_preset=”default” custom_margin=”|auto|-4px|auto||” custom_padding=”||4px|||”][et_pb_column type=”4_4″ _builder_version=”4.7.7″ _module_preset=”default”][et_pb_text _builder_version=”4.7.7″ _module_preset=”default” text_font=”Quicksand|500|||||||” text_font_size=”20px” text_line_height=”1.5em” link_text_color=”#e02b20″ header_2_font=”Quicksand|600|||on||||” text_orientation=”center”]

Hope It will work for you. Submit Your feedback with valuable Comments.

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]