Stop YouTube Related Videos – Wordfence blocking custom code
-
- 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
CJCode (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 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Stop YouTube Related Videos – Wordfence blocking custom code’ is closed to new replies.