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.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

YouTube API 403 error when website restriction set

I am loading the latest videos from a YouTube channel to WordPress, using the YouTube API: function load_feed() { $url = add_query_arg( array( 'part' => 'snippet', ...
1
vote
2answers
18k 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 ...
-1
votes
0answers
9 views

What is the different between YouTube, Tidal and Wordpress [closed]

I am working on a problem to get the best between wordpress, youtube and Tidal within the last 30 days. My current thought process is not working, so I am trying to come up with an alternative method.
1
vote
0answers
19 views

How can I grab the video id of youtube?

I tried $videoID = wp_oembed_get( get_post_meta( get_the_ID(), 'video_url', true ) ); but that doesn't seem to do anything. I'm trying to set playlist id as the video id so the video loops itself. ...
0
votes
1answer
35 views

Modify YouTube Embed Code to fit theme

I'm using a custom bootstrap template and other users will be embedding youtube videos, which I want to be responsive to fit the theme. What can I do to make the normal YouTube embed code, something ...
1
vote
0answers
49 views

YouTube Video autoplay

I am using a YouTube embed on my site. To make it autoplay I have added ?autoplay=1 to the embed too. The code when added to the page/post editor, is showing the video with autoplay. But on the front ...
1
vote
1answer
13 views

Embed youtube list with sidemenu opened

I'm an editor in a wordpress blog I have embedded an youtube list with this code: [youtube https://www.youtube.com/watch?v=*********&list=**************************] I want that the plalist has ...
0
votes
1answer
445 views

Filter for wp_embed_handler_youtube not working

In Wordpress 4.0, if I create a new post and paste a YouTube link directly into the post editor, Wordpress will automatically convert it to a YouTube embed tag. I'm trying to edit the default output ...
1
vote
2answers
2k views

Link Youtube Channel In Wordpress Site

I am trying to develop a site where people can find and view videos of my activities from my youtube channel. I am quite new to wordpress but I decided to use it to achieve this purpose. I have been ...
0
votes
0answers
14 views

youtube full screen on off permater code help for wordpress

I need a help , youtube player not work. whats problem in there?????? when i put here new youtube video id then not showing in here. site link : cintv24 .net my code is /* myYoutubePlaylist ...
0
votes
0answers
34 views

Wrap youtube url in shortcode function using str replace

So i want to use a youtube embed plugin instead of default wordpress embed. I disable the default youtube embed and add a str replace to remove the youtube url just leaving the video id. And i need ...
0
votes
1answer
92 views

Can't embed certain youtube videos into theme

I am unable to successfully embed (certain) YouTube URLs into my theme in the back end, with the intention of having viewable video clips on the front end. Not sure if this a WordPress issue or an ...
0
votes
0answers
44 views

Block editor: Sandbox iframe shows outdated HTML

Even if users disable the popular Lazy Load for Videos plugin and the frontend correctly resets videos so that videos are no longer lazy-loaded, the Gutenberg block does not get reset. Below ...
5
votes
1answer
3k 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
93 views

Add latest Youtube videos on main page [closed]

Is there any ways to get latest Youtube videos from my Youtube channel and show theme in a video gallery on Wordpress page?
0
votes
0answers
774 views

How to modify the HTML output of Gutenberg block? (Youtube)

I'm using a headless Wordpress linked to a Nuxt projet and I like to modify the output of my Gutenblock when it's called from the REST API. Current ouput is : <!-- wp:core-embed/youtube {"url":"...
0
votes
0answers
32 views

How to pass a YouTube thumbnail URL through the a custom image size

I'm currently displaying YouTube thumbnails directly from YouTube using this format which works: <img src="http://img.youtube.com/vi/<?php echo youtube_id; ?>/maxresdefault.jpg" /> ...
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 ...
0
votes
0answers
64 views

Use get_media_embedded_in_content to get Youtube links not in their own line

I am currently using the blow code: $media = get_media_embedded_in_content( apply_filters( 'the_content', get_the_content() ) ); echo $media[0]; This is getting any YouTube link someone posts ...
0
votes
1answer
159 views

Wordpress and Youtube problem

I have problem that Youtube videos are not working on my page. I have done several ways to embed YT videos but nothing. I tried to put just link in post and YT video doesn't show on final post. I ...
9
votes
2answers
6k views

Use [embed] filter in template files

WordPress automatically embeds a youtube video's if I use: [embed] http://www.youtube.com/watch?v=Xog1T5dUxcw [/embed ] This is great, but it doesn't work if I use it in a template file. I have a ...
1
vote
4answers
4k 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 ...
0
votes
0answers
560 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 ...
0
votes
1answer
200 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 ...
1
vote
1answer
136 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
127 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
192 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
1answer
328 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
30 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.
1
vote
0answers
743 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
572 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
54 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
54 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
200 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
183 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 ...
0
votes
3answers
2k views

Embedding Youtube video on comments

In my posts, you can embed a video of Youtube by adding the link to the post. You don't have to do anything beside that. On my comments, I can't do the same thing. Is it possible to embed Youtube ...
16
votes
1answer
12k views

Setting a post's featured image from an embedded YouTube video

If I create a post that has an embedded YouTube video in it (so all I do is paste the YouTube URL into the post and let Wordpress automatically embed it for me), is there a way to have the thumbnail ...
0
votes
5answers
7k views

Get YouTube video id from url in a custom field

Here's the scenario, I have a site with thousands of YouTube video posts which are stored in a custom field 'video_url' which is being used in a custom video player. The custom player I'm using now ...
3
votes
2answers
2k 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 ...
0
votes
1answer
123 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
104 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
429 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
66 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
0answers
278 views

How to load post_meta for custom post type via Ajax

I'm trying to load a YouTube video via ajax outside the loop. I have it working on regular pages, but not anything loaded via ajax. A user would click a button, then a YouTube video will load via ajax,...
3
votes
1answer
103 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?
0
votes
1answer
504 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
894 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
27 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
453 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
602 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 ...