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
- 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 do I hide related videos at the end of a YouTube playlist embed code?
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- Get first video from the post (both embed and video shortcodes)
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- add_filter to youtube embeds?
- Embed .mov file via ‘Add Media’ not working
- Any way to use a custom Parameter for youtube embed without using an iframe?
- How to remove the embed_footer?
- oEmbed youtube video aspect ratio
- ted talks embed fixed, but can’t control size
- Add a YouTube or Vimeo video as a post attachment?
- How to add oEmbed support to my theme?
- How to create a static player top or bottom of wordpress?
- Embed YouTube video on category description
- Audio Playlists – Multiple file type support?
- Search XML file from within WordPress?
- WordPress keeps altering my embed code
- WordPress, oEmbed & YouTube video’s with a ‘dash’
- disable video URL auto-embedding for a part of the post
- Instagram URL is converted into oEmbed
- How to set YouTube video as featured image?
- WordPress get embedded/attachment video
- pdf (25MB) – how to display and enable download?
- How can I grab the video id of youtube?
- Is there a way to create embed codes from wordpress/buddypress content?
- How can I remove the first video from a post and feature it?
- How can I replace an oEmbed URL in post with actual embed HTML
- How to put an external object into WordPress to that occupies most of the available space?
- Reusing header.php from Yii application
- Add Watermark to PDF’s of logged in user in WordPress upon upload to media library [closed]
- How can I embed an Excel spreadsheet that allows users to edit certain fields, but is still “read-only”
- Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?
- TED talk embedded videos cut off by sidebar
- oEmbded with wp_insert_post() [embedly]
- Add parameter to first post only
- Help with jot form pro embed code
- Embed wikipedia page in WordPress?
- WordPress fails to embed video URL on specific theme
- Embed post wont work on custom post type
- How to add srcdoc attribute to YouTube oEmbed in Gutenberg oEmbed Block
- How to embed my latest WordPress post into an external page
- Facebook embeds fixing with functions.php
- Embed video from streamtape using direct link
- Embedded videos not displaying on page
- Security when outputing wp_oembed_get code
- Embed Microsoft Forms into WordPress page
- Why most embed feature doesn’t work?
- ‘[code]’ shortcode to markup programming code does not work
- oembed facebook link?
- My WordPress editor deletes all characters after emoji – how can I fix this?
- Do_Shortcode not working for Embed any tweet
- How to make Youtube short code transfer
- Increase size of Google Document Site Wide [closed]
- Displaying cf post formats with oembed
- How to have embedded images from smugmug take full width of blog posts
- WordPress: embedding last posted video
- Enclosures being deleted “automatically”
- How to anchor to embed video