Don’t know if this is your only issue, but you’re using the_title()
to build your URI. This ECHOS the title, which is not what you want.
Instead, you should be using get_the_title().
I’d also urlencode the title, as Jan suggested.
Your best bet is to print out the YouTube URI after you build it, then try to hit it in a browser. If the results aren’t right, the problem is with your URI.
Related Posts:
- Setting a post’s featured image from an embedded YouTube video
- Do_Shortcode not working for Embed
- Return $post_id when DOING_AUTOSAVE?
- Implementing “Video of the Day” Feature?
- Including Angle Brackets In Pre Sections
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Anchor Text code string is automatically modified by WordPress
- WordPress is converting & to & inbetween [code] brackets
- Notice: Undefined property: wpdb::$current_post What can be wrong?
- Where to save common libraries?
- source code: WP_INSTALLING vs. WP_SETUP_CONFIG in setup-config.php
- Sublime Video: Playlist which gets all attached videos
- Code Friendly Block Quotes
- Remove line breaks from ?
- How to fix a “globals” issue to avoid a rejected theme?
- Embed YouTube video from custom field value
- Need resource on available functions and objects
- WordPress wp_insert_post() returns 0 but not not wp_error
- I want to remove the home page header image from all other pages
- Video Embed with Captions in Turkish
- Lightbox Plus ColorBox plugin and auto playing YouTube video
- How to import my YouTube channel into WordPress?
- Proper implementation/use of code/syntax highlighting
- How to remove all comments from JS, HTML, CSS files?
- How to auto embedded youtube with wp_insert_post()
- oEmbed not working in WordPress
- What data validation we must use in different contexts?
- Need To Post Unformated Code
- Sidebar login: How do I get the username to show after “Welcome”?
- YouTube Sidebar Widget – YouTube service unavailable
- How to manage multiple wordpress project with shared code base
- Block IP Addresses using Code [closed]
- videos not showing on my tag pages
- Find Total Authors
- Why does HTML entities are still encoded in Code Block?
- How to create a checkbox to show/hide a field in WooCommerce checkout [closed]
- how to display google maps with javascript
- How to pass https://achecker.ca/ validator? [closed]
- How to write custom code on WordPress?
- Remove Metaboxes
- Looking to Customize YouTube Video Embeds
- Google analytics won’t work in wordpress
- Where do I add an action hook & callback in my theme?
- How do I reset my footer.php to its original state? (theme: Origami)
- Commenting out in HTML editor breaks template
- wordpress prepare error
- Adding code to send referrer on login page
- Table styles disappear when updating content
- Manage recurring event time
- wp_editor save all content
- Need an elegant solution to declare the value of two variables based on the count of the post
- How to insert integration code for CRM?
- You tube videos Appear Different Dimension
- A good way to include snippets of code in both posts, pages and Event Manager Template files?
- Anchor Text code string is automatically modified by WordPress
- Return $post_id when DOING_AUTOSAVE?
- Choopy Video Playback in a popup using Artiss Youtube Embed [closed]
- Can someone please help me find a solution to my youtube embed problems? [duplicate]
- Changes in code only show after changing theme
- Code Highlighting in BlockQuote
- Fetching Video From YouTube Automatically [closed]
- Where do I go to add a tag before the closing body tag?
- ‘NoneType’ object has no attribute ‘group’
- Generating Thumbnails for video
- Upload Multiple Files With media_handle_upload
- Replace audio/video enclosure with player?
- add_filter to youtube embeds?
- WP REST – video and audio players
- I want to remove the links from the term list returned by get_the_term_list
- Youtube parameters within WordPress embed code?
- How to generate a featured image from a video embeded in a metabox
- Grab YouTube Thumbnail AFTER Post?
- Proper indentation of code generated inside hooks
- How to generate video out of images via WordPress plugin
- YouTube embed parameters?
- Embed Youtube video link in wordpress editor
- Video uploaded with the native media uploader gives Error 404
- I got an issue after i migrated a site
- How to change the way wp_embed handles only youtube videos?
- fetch images and videos
- How can I determine where I want to edit in the backend (server)
- Displaying Meta-Box Data Properly
- displaying flv-video attachment in post
- How to change the link on the logo at the menu?
- Can’t get video meta from wp_read_video_metadata()
- Insert PHP code in Text
- what code to add to search.php
- how to show youtube comment profile pic in wordpress
- Copying and pasting to WordPress “code editor” code via the front end and clipboard
- Problem with MEMCACHE and Redis with wp_options
- Embedded videos not displaying on page
- youtube full screen on off permater code help for wordpress
- Cant play videos
- admin-ajax.php 400 bad request – whats wrong with my code?
- How to install ffmpeg extension for php 5.6.25 for wp video posts plugin?
- Archive – Show Video from First Post
- CSS code for “inserting a custom post divider” after each post
- Remove_role not working, gives “Call to undefined method stdClass::remove_role()”
- I am experiencing difficulty fulfilling client request
- Avoid embedding YouTube videos and open them in a new window