Right align a youtube video
Use an id and CSS selector for the element and align it in your stylesheet.
Use an id and CSS selector for the element and align it in your stylesheet.
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
If there’s a plugin, it has to be found. If not, a custom solution has to be written. But YouTube does provide an API for that. YouTube API v2.0 – Direct Uploading This page explains how to upload videos to YouTube using direct uploading. Direct uploading lets you add videos that are in your video … Read more
To solve this: 1. Add custom meta to each post which take youtube url( name of custom meta in code youtube). 2. In index.php loop: while(have_posts()){ the_post(); //use [get_post_meta][3] to get youtube post meta $youtube_img = ‘http://img.youtube.com/vi/’.substr( get_post_meta($post-ID,’youtube’) ).’/0.jpg’; //$youtube_img is your youtube video image url echo ‘<a href=”‘.get_permalink().'”>’; echo ‘<img src=”‘.$youtube_img.'” title=”‘.get_the_title().'” alt=”youtube video … Read more
You can use YouTube developer API. Example how to get recent videos below: $data = wp_remote_get(‘http://gdata.youtube.com/feeds/api/users/<USERNAME>/uploads/?start-index=1&max-results=40’); $response = new SimpleXMLElement($data[‘body’]); foreach ($response->entry as $entry): $vid_id = ”; if ( preg_match(‘#videos/([^/]+)$#’, $entry->id, $matches) ) { $vid_id = $matches[1]; } if ( $vid_id ): ?> <a href=”http://youtube.com/watch?v=<?php echo $vid_id; ?>”> <img src=”http://i.ytimg.com/vi/<?php echo $vid_id; ?>/1.jpg” width=”220″ height=”130″ … Read more
function set_youtube_as_featured_image($post_id) { if( has_post_thumbnail($post_id) ) return; $url = get_post_meta($post_id, ‘ci_cpt_video_link’, true); if ( $url && filter_var($url, FILTER_VALIDATE_URL) ) { // getting thumb url from video url parse_str( parse_url( $url, PHP_URL_QUERY ), $youtube_vars ); $youtube_id = $youtube_vars[‘v’]; $youtube_thumb_url=”http://img.youtube.com/vi/” . $youtube_id . ‘/0.jpg’; // download and save thumb $get = wp_remote_get( $youtube_thumb_url ); $mime_type = wp_remote_retrieve_header( … Read more
Having &controls=0 instead of ?controls=0solved the issue for me.
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
The problem is that the URL to your script is pointing to the Thematic theme directory, not your child theme. Instead of: $plugin_array[‘youryoutube’] = get_bloginfo(‘template_url’).’/editor_plugin.js’; …you need: $plugin_array[‘youryoutube’] = get_stylesheet_directory_uri() . ‘/editor_plugin.js’;
Try adding another attribute See the Codex