Embeding YouTube video via a template function throws iframe cross-domain policy error
Building a fake embed shortcode and then calling run_shortcode to do this makes no real sense. Try this instead: echo $wp_embed->shortcode(array(), $my_tour_video); Edit: Additionally, when I use your code on a test page, using that embed, I get no such error as you’re describing. If you can come up with a reproducible test case, then … Read more