How can I grab the video id of youtube?
How can I grab the video id of youtube?
How can I grab the video id of youtube?
I think you want to change default video width. You can change default embed video width and height by embed_defaults filter. add_filter(’embed_defaults’, ‘ravs_embed_defaults’); function ravs_embed_defaults($embed_size) { if (is_single()) { // Conditionally set max height and width $embed_size[‘width’] = 640; $embed_size[‘height’] = 600; } else { // Default values $embed_size[‘width’] = 460; $embed_size[‘height’] = 600; } … Read more
Well this is not exactly a WordPress problem / solution. First you have to either get the video id from the video_site_url post meta or save the YouTube video id in it’s own post meta field, maybe youtube_video_id. Next you can get the thumbnail using one of these url http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg Read this … Read more
This may be due to a failed network request from the server to youtube. If the server cannot reach YouTube, the embed will show as “failed to embed” in the editor. You can fix the problem by allowing the server to make network requests to youtube. The WordPress Proxy documentation may be helpful, https://developer.wordpress.org/reference/classes/wp_http_proxy/ WordPress … Read more
The code seems incomplete. Maybe the problem is simply that you define $id but then try to use $user_id? Also, I think id is a protected variable, so maybe use my_id instead. Try this: www.mysite.com/test?my_id=123 $user_id = $_REQUEST[‘my_id’]; $camp_link = get_site_url().”/campaign-detail/?id=”.$user_id; echo “<p class=”campaign_store_name”><a href=””.$camp_link.””>”.$camp_title.”</a></p>”; $arform_id = Get_ARFORM_ID_using_slug($camp_link);
Your problem is not within your control. iframes are not your site (at least when embedding content from outside sources). The content there is under the control of some other developer. Then you have the problem that hiding and showing things using JavaScript can really mess things up – a common example is with Google Maps. … Read more
Try just pasting the YouTube URL in to the post or page in the text editor with-out embed code as an editor. See if that works never heard anyone having this problem… https://www.youtube.com/watch?v=VYmp9HmMYwU&t It’s super easy to embed videos, images, tweets, audio, and other content into your WordPress site. This feature was added in WordPress … Read more
There’s always a filter you can use to hook into the output, see embed_oembed_html. Try this in a custom plugin or child theme’s functions file, it will add any other query strings to the iframe src attribute: add_filter(“embed_oembed_html”, function( $html, $url, $attr ) { parse_str(parse_url($url, PHP_URL_QUERY), $url); if ( $url ) { foreach ( $url … Read more
Update: Try this one.. it works for youtube url in your post which is converted to iframe by wordpress. function remove_youtube_controls($code){ if(strpos($code, ‘youtu.be’) !== false || strpos($code, ‘youtube.com’) !== false){ $return = preg_replace(“@src=([‘\”])?([^’\”>]*)@”, “src=$1$2&showinfo=0&rel=0”, $code); return $return; } return $code; } add_filter(’embed_handler_html’, ‘remove_youtube_controls’); add_filter(’embed_oembed_html’, ‘remove_youtube_controls’);
The Youtube is called by a script named “jquery.st.youtube.js” which is located in your themes folder. You seem to use a premium theme named “Wunder” which effectively means you can do one of two things: 1) You can edit the themes files directly, search for the enqueuing of the script jquery.st.youtube.js (most likely within the … Read more