Embed YouTube video from custom field value
Aha! WordPress has a built in function for it 😀 <?php echo $embed_code = wp_oembed_get( $video ); ?> Simples.
Aha! WordPress has a built in function for it 😀 <?php echo $embed_code = wp_oembed_get( $video ); ?> Simples.
If you embed a vimeo video at that size it hides the playback buttons, no magic involved. EDIT- to display a static thumb of a youtube video: your video url: http://www.youtube.com/watch?v=WQO-aOdJLiw take the v= portion of the url to get the large thumb url: http://img.youtube.com/vi/WQO-aOdJLiw/0.jpg and the small thumb url: http://img.youtube.com/vi/WQO-aOdJLiw/1.jpg
Just use the </li> …
I think this is what you are looking for: <?php echo wp_oembed_get(‘https://www.youtube.com/watch?v=vZBCTc9zHtI’); ?> For more details check this documentation.
The Youtube playlist have a xml strema, RSS feed. You can parse this and create post via wp_insert_post() and add as content the URL to the video. Publish this and you have wich each new video from the playlist a new post. The best way is, that you write a custom plugin. But you can … Read more
Embed YouTube video on category description
Cannot embed YouTube video
So apparently the issue also happens in WordPress 5.6 (the latest release as of writing), and YouTube is probably at fault because the (oEmbed) <link> tags are in the body instead of the head (see screenshot below), and that in turn causes the issue because WP_oEmbed::discover() looks for the <link> tags in the head only. … Read more
It doesn’t look like load policies are configurable with WP’s auto-embed. But see the docs on how to use WP’s embedding: http://codex.wordpress.org/Embeds And see the Developer Resources and API at WP: http://developer.wordpress.com/docs/oembed-provider-api/ WP’s auto-embedding uses oEmbed, and the specs and API are here: http://oembed.com/
Another method can be like this, On the current post when you save look for youtube video in the content, if found save it to the transient ‘videos’ and the post_id (for the link to the post later) insted of regex im using parse_url() and parse_str() add_action( ‘save_post’, ‘save_youtube_videos’ ); function save_youtube_videos( $post_id ) { … Read more