I added it to the bottom of the theme’s function.php file right before the last bracket and it did not do anything. I am using an Ink Theme template. Does that matter? Or did I not place it in the correct place in the file?
Here is the code:
function change_magnific_popup_iframe_setting(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘a[href*=”youtube.com/watch”]’).magnificPopup({
type: ‘iframe’,
iframe: {
patterns: {
youtube: {
index: ‘youtube.com’,
id: ‘v=’,
src: ‘//www.youtube.com/embed/%id%?rel=0&autoplay=1’
}
}
}
});
});
</script>
<?php
}
add_action(“wp_footer”, “change_magnific_popup_iframe_setting”);