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>