Importing YouTube Videos As Posts – From Playlists
It is possible, but you’ll have to do a little work on your own (the Plugin is not needed). First, load the Zend GData Class. Second, you’ll have to read trough here.
It is possible, but you’ll have to do a little work on your own (the Plugin is not needed). First, load the Zend GData Class. Second, you’ll have to read trough here.
If working with wp_insert_post and the youtube api is too much work, or too complicated, you may be interested in the plugin called “Automatic Youtube Video Posts” (AYVP). It has been working quite well for us. There are some bugs (nothing critical) and it is not the most efficient plugin, but it does exactly what … Read more
When you call get_the_content() some filters aren’t applied like they would with the_content() so if you want your content to be formatted you have to use the following: $my_content = apply_filters( ‘the_content’, get_the_content() ) If you want to extract the youtube video out of your content you’ll have to detect the youtube link with a … Read more
Iframe Youtube video doesn’t work
Try embedding an iFrame. Go to the youtube video you’re trying to post. Click right > Copy embed code. Paste it in the HTML editor on wordpress. It should work without a plug in.
MayBe This Plugin can help you out : http://wordpress.org/extend/plugins/video-thumbnails/ But if you want to do this manually then you can get Video Image from this Link : http://img.youtube.com/vi/SgGVitTU9F8/0.jpg Replace “SgGVitTU9F8” to your video id
function add_embed_filter($html) { return ‘<div class=”js-video widescreen”>’.str_replace(“?feature=oembed”, “?html5=1”, $html).'</div>’; } add_filter( ’embed_oembed_html’, ‘add_embed_filter’, 50, 1); Of course if WordPress or Youtube change how this url is constructed you will have to adapt your code accordingly, but I tested it, and this will get you there with WordPress 3.8.1. I also did not test how this … Read more
If you restrict the application (or API key) by HTTP referrers, then your remote HTTP request should include a valid HTTP_REFERER header, which wp_remote_get() does not set by default. And you can set the header using the headers argument like so where the array key is referer (note that it’s not double “r” as in … Read more
the_field() prints the value, it doesn’t return the string, so you cannot use it in a variable. Use … $video = get_field(“video_file”); … instead.
According to the docs: http://codex.wordpress.org/Embeds as long as you have “Auto-embeds” checked in Administration > Settings > Media SubPanel you can paste in the youtube url and if it’s on its own line the video should be embedded. Alternatively you can wrap it in the embed short code e.g.