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 it might be solvable.
If you are using the /embed/ URL, then that might cause it. Use the real URL of the video instead, as it shows when you’re looking at YouTube’s video page. The same URL you would normally paste into a post’s content.
Related Posts:
- Manipulating oembed_dataparse stopped working for YouTube embeds
- Video Embed with Captions in Turkish
- How to embed YouTube videos in posts without adding suggested videos at the end?
- Div around YouTube video
- WordPress Mediaelement – Youtube Videos Embed Options
- add_filter is failing to append &rel=0 to end of YouTube URL in oEmbed
- How do I embed youtube videos with https instead of http in the URL?
- WP Oembed not passing through the “autoplay=1” variable
- Modify youtube video size on one page and show another size on different page
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- How to change thumbnail of embedded Youtube video?
- How to add new embed handler not supported by oembed
- Youtube – Embed as IFRAME
- wp_embed_register_handler is not working
- Any way to use a custom Parameter for vimeo embed without using an iframe?
- Is it possible to modify the default YouTube embed attributes string?
- Removing WordPress Icon from oembed link footer
- Get all Youtube video’s from posts and embed them on a different page
- Hiding Comments Icon On oembed
- Youtube parameters within WordPress embed code?
- vimeo/youtube video embed with thumbnails
- Embed YouTube video from custom field value
- Can I use wp_oembed_get to detect a valid embeddable link or is there a better way to do so?
- extra text in Vimeo Embedded videos
- How can I force oEmbed to display fixed height & width dimensions?
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- How to auto embedded youtube with wp_insert_post()
- How to apply an ID to Shortcode Embedded iframe
- How to change the way wp_embed handles only youtube videos?
- How to make my new theme read [youtube id=”id of the video here” width=”600″ height=”350″]?
- Embedding Youtube video on comments
- How to make enqueue_embed_scripts work with the embed_template filter
- YouTube embeded video will not resize (only full screen responsive) [closed]
- WordPress fails to embed video URL
- Add class and change src type inside wp_oembed_get
- How to disable URL preview in WordPress comments
- How to modify the HTML output of Gutenberg block? (Youtube)
- Remove wordpress embed share icon?
- Youtube iframe embed keeps disappearing from page
- Adding an official oEmbed provider to WordPress
- Completely disable oEmbed and auto-embed on frontend and post editor?
- How can I change Max Embed Size in WordPress 3.5?
- How can I clear oEmbed caches for YouTube on posts as they are loaded
- Soundcloud embed shortcode does not work
- How add class youtube and type/html to oembed code?
- wp_embed_register_handler not working
- Customize Embedded Tweets (or, How To Hide Photos in Embedded Tweets)
- How to change WordPress embedded player size or show just the play button
- how to embed external webpage in my wordpress page
- Adding a wrapper to the youtube embed automatically?
- Convert all youtube link to embed
- How to embed a WordPress article on another website [closed]
- WordPress 5.3.x YouTube oEmbed is not working
- Use oEmbed in List Items
- How can I override print_embed_sharing_dialog() in WordPress 4.5
- Embed Post in external page
- Outside url for post content
- want to stop stripping out from my post content
- How to register a embed handler as a fallback to a oEmbed handler?
- oEmbed not working in WordPress
- MP4 video on wordpress working on desktop, not on mobile devices
- How to Implement Responsive YouTube Video Framing? [closed]
- Responsive Embeds using default embed shortcode
- How can I replace an oEmbed URL in post with actual embed HTML
- How do I embed a YouTube video in WordPress 3.0?
- WordPress block editor embeds not working in theme (single.php)
- WordPress keeps autoplaying my Youtube-Links no matter what I write
- Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)
- How to make an embeded a Youtube video from custom field text responsive to screen size?
- How to put an external object into WordPress to that occupies most of the available space?
- How to allow YouTube object embed in WordPress 3+?
- WordPress get_media_embedded
- Modify YouTube Embed Code to fit theme
- How to edit embed filter for youtube video to allow responsive full width layout
- How do I not embed the SoundCloud player? I just want the link
- How can I embed an Excel spreadsheet that allows users to edit certain fields, but is still “read-only”
- TED talk embedded videos cut off by sidebar
- oEmbded with wp_insert_post() [embedly]
- iframe with Youtube video appears for logged-in users, but not for incognito users
- Looking to Customize YouTube Video Embeds
- Static image for embedded YouTube video instead of blank player?
- add youtube thumbnail in index and single.php add video
- Embed a Google Docs in WordPress?
- embed via wp_embed_register_handler only works in front-end
- Is it possible to embed a wordpress tag page on wordpress?
- Code playground (like CodePen) inside WordPress?
- Auto embeds don’t work for attachment descriptions
- Embed wikipedia page in WordPress?
- Nofollow attribute in WordPress link embed code?
- Advanced Custom Fields oEmbed video width and height
- ‘[code]’ shortcode to markup programming code does not work
- Embedding multiple song players on one page without it effecting the load time
- Post editor doesn’t save embed media [closed]
- how to embed a .mp4 video the url postfix with secret key
- CartoDB embedding doesn’t work
- How to embed php page from separate site
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- How to anchor to embed video
- Avoid embedding YouTube videos and open them in a new window