DIVI: Empfohlene Videos ausblenden / Disable related YouTube Videos

von Eric-Oliver Mächler | Juni 11, 2019 | Allgemein | 0 Kommentare

Schlagwörter: DIVI - Youtube

Inhaltsverzeichnis

Wenn ihr bei DIVI die Empfohlenen Videos ausblenden wollt, dann könnt ihr nicht mit ?rel=0 arbeiten – das wird ignoriert und das Video wird nicht abgespielt.

Lösung

Loggt euch einfach in wp-admin eures WordPress System ein, geht dann zu:
Divi / Integration / und fügt den Code in den «Add code to the < head > of your blog» ein

Solution

If you want to Disable related Youtube Videos, use this code.

Login to wp-admin and in Divi / Integration / «Add code to the < head > of your blog»

Code

<script type="text/javascript">
(function($) {

$(window).load(function() {
// Disable YouTube Related Videos
$('.fluid-width-video-wrapper').each(function() {
var src = $(this).find('iframe').attr('src');
$(this).find('iframe').attr('src', src + '&rel=0');
});
});

$(document).ready(function() {
// Open project promo in new tab.
$('.single-project .et_pb_promo').find('a').attr('target', '_blank');
});

})(jQuery);
</script>

0 Kommentare

Kommentar Schreiben

Du kannst auf Fediverse-Profile verlinken, indem du fl:@benutzername in deinem Kommentar eingibst.

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert