Quantcast
Channel: WordPress.org Forums » [Wordfence Security - Firewall, Malware Scan, and Login Security] Support
Viewing all articles
Browse latest Browse all 33261

Stop YouTube Related Videos – Wordfence blocking custom code

$
0
0

Replies: 0

  • I’m using Divi theme.
  • I have YouTube videos on my site.
  • I don’t want related videos to play at the end.
  • If Wordfence is deactivated, custom code stops related videos by adding &rel=0′ to end of all YouTube video URL’s. (See code below.)
  • If I activate Wordfence it blocks the code from running.
  • How to I configure Wordfence to permit my code to run?

    Thanks
    CJ

    Code (added to Divi Theme options, Integration, <head> of blog.)
    ==============================================================

<script>
jQuery(document).ready(function($ ) {
$('.et_pb_video iframe').attr( "src", function( i, val ) {
return val + '&rel=0';
});
});
</script>

Viewing all articles
Browse latest Browse all 33261

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>