Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [youtube]

Youtube is a video sharing website. WP enables inclusion of Youtube videos through the oEmbed API. There are also plugins that support video embedding.

0
votes
0answers
9 views

Loading Youtube Video Methods

I have a post grid where i can make the youtube video grids but if loaded directly it results in a very slow website. Also ends up javascript render block. In WordPress how can this be handled? Is ...
0
votes
0answers
18 views

How to replace old YouTube embed code in Wordpress

I'm moving an old site from ExpressionEngine to Wordpress. The blog has over 3000 posts and some of them have YouTube videos embedded in them using code like this: <object width="425" height="344"&...
0
votes
0answers
33 views

Advanced Custom Fields oEmbed video width and height

I'm using Advanced Custom Fields plugin and i have a oEmbed field in it where i want to display YouTube videos. This is how they look now: http://electives-abroad.org/custom-field-test/ Why do they ...
1
vote
1answer
32 views

How to auto embedded youtube with wp_insert_post()

I use this code to add a post to Wordpress: $new_post = array( 'post_title' => $title, 'post_content' => "test https://www.youtube.com/watch?v=4g3e8XwVIYc https://youtu.be/...
0
votes
1answer
16 views

How to make an embeded a Youtube video from custom field text responsive to screen size?

So I've embedded a youtube video using oembed like this : $embed_code = wp_oembed_get(get_field('youtube_video') ); echo $embed_code; But how do i make it respond to screen size? viewing it on a ...
1
vote
1answer
60 views

Getting youtube links from post_content not working

I am trying to retrieve youtube links from post_content but it does not work.. function get_yts() { $query_args = array( 's' => 'youtube.com/watch?v=', ); $posts = ...
0
votes
0answers
13 views

Youtube live chat is not loading comments

So I embed a youtube video and it worked and then i tried getting the live chat and it showed up but its not showing the feed from youtube. I can post in there and see my my post on the actual youtube ...
0
votes
0answers
17 views

Detecting if a Youtube video has been watched and change something on a page in reaction to it

Every of my Youtube videos has a dedicated Wordpress page. I want to detect if a video has been watched (say for example for 80%) and in reaction to it, I want to change something on it's page (I want ...
0
votes
1answer
109 views

Youtube iframe embed keeps disappearing from page

I am trying to embed a video on my homepage. I add the embed code from YouTube and paste it into a custom html blog on the gutenberg editor. I click update and check my website and the video is there....
0
votes
1answer
23 views

Get youtube link title in post title

If my post title is https://www.youtube.com/watch?v=PJmMiZH3Q6I I want it to be converted to original video title which is "Ras Cricket - Fyah" Is there a way without API stuff cause it seems hard.
0
votes
0answers
16 views

Wordpress add meta value and remove post from any loop in the theme

I have a website which imports videos automatically from Youtube. and I have used these codes in (single.php because it's not working in functions.php) to check if the video has been deleted then ...
0
votes
0answers
405 views

oEmbed not working in WordPress

I am using custom embed URL for embedding a video. Embedding Youtube and Vimeo working really fine. But only this URL is not working. But if I add via iframeit is working. But I need to add this via ...
0
votes
1answer
104 views

How to edit embed filter for youtube video to allow responsive full width layout

Im trying to edit the suggested embed filter from wordpress.org to make youtube videos always stay 100% width inside its container div, while keeping the appropriate height dimension as needed. Is ...
2
votes
1answer
39 views

How to link to YouTube videos with thumbnails?

I am brand new to WordPress and find it very confusing. I have a small blog and cannot find a way to easily add a small grid of YouTube thumbnails that link to those videos. I have looked at all ...
1
vote
2answers
48 views

Wordpress site in China times out on requests to youtube [closed]

My wordpress site dj.pyromusic.cn is based in China, on a chinese server. Somewhere in the theme, or the site, it is making a request to youtube which is obviously blocked here, causing the load time ...
2
votes
0answers
108 views

Embed YouTube video on category description

I would like to embed a YouTube video on my category description pages. When I pasted the URL or embed code in the editor, I see the video. But on the page itself it just shows the code. Is there a ...
0
votes
0answers
83 views

Iframe Youtube video doesn't work

I'm currently developping a custom page (a handmade one) for my Wordpress website. This page is used to check the validity of a token, if the token is still up, some videos are shown on the page ...
1
vote
1answer
9k views

How to change thumbnail of embedded Youtube video?

When I embed a Youtube video onto my page, is there a way to change the thumbnail displayed (screenshot)? I do not have admin access to the Youtube video in-question. I would prefer a non-plugin ...
0
votes
1answer
64 views

Add youtube embed to woocommerce variations

How to add youtube embed code/ embed shortcode to woocommerce product variations? When I insert the shortcode [embed] also iframe code youtube and then saving the product variations the codes gone? ...
0
votes
2answers
58 views

Extract links inside embed tags in WordPress

I am using the default WordPress embed to embed a couple of videos in the content. I want to extract the video link from [embed]https://www.youtube.com/watch?v=Z9QbYZh1YXY[/embed], can anyone help ...
0
votes
1answer
342 views

Wordpress Mediaelement - Youtube Videos Embed Options

I have a custom field where I define the Youtube Url as a string. https://www.youtube.com/watch?v=3VqHtEF3LPE This then becomes the src in my theme's shortcode: <?php $ysrc = get_field('...
0
votes
1answer
31 views

I'm having a problem viewing the Youtube video

I'm having a problem viewing the Youtube video. In my single-custom I am using: <? Php echo wpautop ($post-> post_content); ?> And when I put the Youtube link he is not showing the video ...
0
votes
1answer
301 views

YouTube embeded video will not resize (only full screen responsive) [closed]

I am running Headway theme in the latest version of WP. I embed the code below although it ignores the youtube embed size and renders full width on the front end. Code:
1
vote
2answers
126 views

Remove Title of youtube video

How can i put a youtube video on my post without show the default title from youtube? I tried to put this code in the theme´s functions, but not worked. function remove_youtube_controls($code){ ...
0
votes
1answer
25 views

Post editor doesn't save embed media [closed]

I'm facing weird problem - I'm trying to save embed media to post in different computers and it doesn't work in all of them. We do the same process (insert -> media -> embed -> youtube code), and in ...
1
vote
1answer
408 views

YouTube embed parameters?

According to this: https://codex.wordpress.org/Embeds You can just paste in your YouTube link into your post body and it becomes an embedded YouTube Video. This works for me, but it seems to ignore ...
1
vote
1answer
516 views

Embed Youtube video link in wordpress editor

I have a problem embedding Youtube videos link on my website.The problem is that my website works fine when i post with admin user .. but posting a video with an editor user not working . I copy the ...
0
votes
1answer
26 views

Custom YouTube Plugin loading different PHP library on live site and localhost

It's come to my attention that the original question was a little unclear. I'm working on a custom-built YouTube plugin for WordPress which has passed all the tests on my local installation, but as ...
2
votes
2answers
5k views

Preventing YouTube embeds loading multiple instances of player JS?

I have noticed on many WordPress sites I work on that when there is more than one YouTube video embedded, multiple instances of the player JS will be called. Since it's a full megabyte of data, I am ...
0
votes
1answer
174 views

Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?

I have added a custom field to 2 posts in order for a non-developer to be able to post a video link from YouTube, and put the embed id in a custom field to be called by the code below. But when I ...
1
vote
4answers
3k views

Why isn't this youtube shortcode working?

echo do_shortcode('https://www.youtube.com/watch?v=vZBCTc9zHtI'); Is merely printing https://www.youtube.com/watch?v=vZBCTc9zHtI" out onto the page. I know I can display the video with html with ...
1
vote
2answers
2k views

How to apply an ID to Shortcode Embedded iframe

I want to add an id="myid" to shortcode embedded iframe:- $video_url = get_post_meta($post_id, 'video_url',true); //or $video_url .= 'video url'; $check_embeds=$GLOBALS['wp_embed']->run_shortcode( ...
0
votes
1answer
139 views

jQuery plugin is loaded correctly, but does nothing

I'm trying to use this jQuery plugin to load a fullscreen background on a website. I've first implemented it in a static HTML on my desktop, this works fine. I then put everything in my theme and load ...
0
votes
2answers
103 views

Order Posts By Youtube Views

I have a wordpress website where I post song lyrics. I have written a wp query to list specific posts and order them by post views. However, I would like to order them by youtube views instead. I ...
0
votes
1answer
243 views

WordPress, oEmbed & YouTube video's with a 'dash'

I am having an issue where a video with a 'dash' (-) in the url are not being embedded in WordPress. This is happening when pasting the URL into a page / post and is also able to be reproduced when ...
1
vote
1answer
1k views

Iframes inside bootstrap tab disappear when tab is shown

I am currently struggling with strange iframe behaviour: I have bootstrap tab with three youtube iframes in it. When I go to this tab for the first time, iframes dissappear, but if I click on another ...
1
vote
1answer
651 views

pass user id in slug and get user information

I have user id and I am getting all information using user id on page with slug. When I pass the user id in slug then I am not getting user information on page. For example I have www.mysite.com/...
1
vote
1answer
60 views

Video Embed with Captions in Turkish

I normally embed videos by directly writing the URL in the WP built in [embed] code. Like: [embed]https://www.youtube.com/watch?v=p_o4aY7xkXg[/embed] But now I want this video to open automatically ...
0
votes
1answer
136 views

Widget to embed youtube video

I am new to WordPress development. Currently I am trying to make an widget to embed video from youtube. My plan is an admin or an author will just give the video id and the video will be in widget ...
0
votes
1answer
587 views

iframe with Youtube video appears for logged-in users, but not for incognito users

I have a YouTube video on a site's homepage, but when viewing the site as an unknown / non-logged-in user, it's NOT showing up at all. And when viewing in admin / a logged-in WP user of the site, it ...
3
votes
2answers
1k views

WordPress Editor not getting youtube video preview

When I am creating a post from the admin panel and using a youtube link in the Editor, the editor automatically fetching the video from youtube and displaying right away in the editor. But When i am ...
1
vote
1answer
2k views

Cannot embed YouTube videos “Failed to embed” error

I get this error on multiple WordPress sites I run, when I try paste a YouTube video or use the shortcode [embed]: This only happens with YouTube. Other media websites such as Vimeo has no problem ...
3
votes
1answer
579 views

Manipulating oembed_dataparse stopped working for YouTube embeds

My go-to code to manipulate YouTube embeds does not work anymore. Can anyone explain to me what I am doing wrong? This is my code in functions.php // OEMBED FILTER function bolster_oembed_filter( $...
3
votes
1answer
95 views

Youtube - Embed as IFRAME

When I embed a YouTube video in the suggest manner (paste url) it adds this as an object. Is there a way to embed as IFRAME instead?
5
votes
1answer
2k views

How can I clear oEmbed caches for YouTube on posts as they are loaded

I have a site with tons of posts hundreds/thousands of which have YouTube videos embedded. Most use the default [embed]youtube_url[embed] format and the actual embed code is stored in the oEmbed ...
1
vote
1answer
636 views

Is it possible to modify the default YouTube embed attributes string?

I'd like to suppress related YouTube videos by appending '&rel=0' to the string of embed attributes output to the video iframe in my post. I believe this requires a filter that modifies the $...
0
votes
1answer
52 views

WordPress keeps autoplaying my Youtube-Links no matter what I write

WordPress (with the LayerSlider plugin) keeps autoplaying my video no matter what code I use. Here's the embed-Link for the video: <iframe width="840" height="473" src="http://www.youtube.com/...
0
votes
1answer
70 views

Add video tag to youtube link fron content

I have variable $post->post_content that return me detail of post and some video URL from YouTube. I need to remove any text from $post->post_content else YouTube link, And add to YouTube likn ...
0
votes
0answers
876 views

Youtube Iframe Api play one video at a time

Below is my code and only video 1 can stop video 2 but video 2 can not stop video 1. I want one video to play at one time. What could be the reason and i am using shortcode and below is my code in ...
0
votes
1answer
149 views

display only youtube video sticky post

I want to display (on the home page) only the youtube video (or vimeo) of a sticky post. I found this code from /*Sticky list variables en page d'accueil*/ function wpb_latest_sticky() { /* Get ...