3
votes
Accepted
How to change thumbnail of embedded Youtube video?
The [video] shortcode can be used with the src being an URL of a youtube video. To set a placeholder, preview thumbnail use poster, it even works nicely via GUI. In the end it should look somewhat ...
3
votes
Accepted
Wordpress block editor embeds not working in theme (single.php)
That would be because they're using oEmbed, not a shortcode.
You should use the function the_content() to render the content of a post, as it applies all the things required to make embeds, shortcodes,...
3
votes
Preventing YouTube embeds loading multiple instances of player JS?
In theory youtube embedding is done as iframes, and iframe are virtual additional independent web pages which are rendered at the same window, therefor the content of one iframe can not gave an impact ...
2
votes
WordPress Editor not getting youtube video preview
Had this same issue, but figured it out once I dug around in WordPress a bit. What you need to do to make this work in a frontend tinyMCE editor is make sure you enqueue this JS file:
add_action( '...
2
votes
Youtube - Embed as IFRAME
If you don't want to utilize the latest oembed functions and want the old iframe way from any page or post, you can do these:
Get the embed code from any youtube video.
While editing/creating your ...
2
votes
Remove Title of youtube video
This works, the OP code was odd and I've never seen that usage before or the other filter. Tested and works. This code removes Title on youtube but doesn't touch anything else since the parameters ...
2
votes
YouTube embed parameters?
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 ...
2
votes
How to make an embeded a Youtube video from custom field text responsive to screen size?
Welcome to WordPress StackExchange.
This is really an HTML/CSS question rather than a WordPress specific one, so you will have better luck getting a quick answer in the future by posting to another ...
2
votes
Accepted
WordPress 5.3.x YouTube oEmbed is not working
So apparently the issue also happens in WordPress 5.6 (the latest release as of writing), and YouTube is probably at fault because the (oEmbed) <link> tags are in the body instead of the head (...
1
vote
Accepted
Embeds (YouTube, Spotify) Work Live but Won't Load in Block Editor
I fixed my own issue by clearing my browser cache. (Ugh. It's always the simplest thing that I miss.)
1
vote
Accepted
Avoid embedding YouTube videos and open them in a new window
Simple Shortcode:
function alternative_youtube_embed_func( $atts ) {
$a = shortcode_atts( array(
'id' => 'ScMzIvxBSi4' // youtube video ID from video URL
), $atts);
return '<...
1
vote
Avoid embedding YouTube videos and open them in a new window
I am trying to do the exact same as you.
I installed a plugin, think it's called lazy load. It made a nice, local thumbnail for my YT video in my WP post. Then I installed a plugin, that opens ...
1
vote
Accepted
I'm having a problem viewing the Youtube video
You should use the_content function to process embeds.
Another way is to apply the_content filter.
apply_filters( 'the_content', $post->post_content' );
1
vote
YouTube embeded video will not resize (only full screen responsive)
There is a check box in the Headway backend. Unticked it - and it worked. Embedded youtube video will now resize with iframe size code. Thanks Dave Romsey
1
vote
Accepted
YouTube API 403 error when website restriction set
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 ...
1
vote
Accepted
Modify YouTube Embed Code to fit theme
If you're using the block editor, the fix is simple:
add_theme_support( 'responsive-embeds' );
You can also make the iframe responsive using pure CSS, just wrap it in a div:
<div class="yt-...
1
vote
Accepted
Embed youtube list with sidemenu opened
This isn't possible, youtube doesn't provide an embed with an open playlist. If it did, this isn't something that could be resolved from the WordPress end, as it's a Youtube OEmbed issue.
You will ...
1
vote
Getting youtube links from post_content not working
Ok here is working code:
function get_yts() {
$query_args = array(
's' => 'youtube.com/watch?v=',
);
$posts = get_posts( $query_args );
foreach ($posts as $p) {
$input_line = $p-&...
1
vote
Accepted
How to edit embed filter for youtube video to allow responsive full width layout
Thanks to Serkan's suggestion I was pointed in the right direction to search for editing the wrapper rather than filtering the video itself (even though I would have loved a "filter only" solution.) ...
1
vote
Wordpress site in China times out on requests to youtube
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 ...
1
vote
Embed Youtube video link in wordpress editor
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?...
1
vote
Preventing YouTube embeds loading multiple instances of player JS?
Google I/O 2011: YouTube's iframe Player: The Future of Embedding will tell you all about the past's future. You might be able to find an alternative on to iFrame on the YouTube Developer section but ...
1
vote
Accepted
Why is my get_post_meta not properly calling the custom field when attempting to embed a YouTube video?
By default get_post_meta returns an array. If you wish to return a single value you need to set the 3rd parameter to true.
Eg.
get_post_meta(93, 'youtubeId', true);
And did you know that your ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
youtube × 148embed × 55
oembed × 29
videos × 18
plugins × 16
shortcode × 10
posts × 6
video-player × 6
custom-post-types × 5
php × 5
post-thumbnails × 5
block-editor × 5
customization × 4
filters × 4
javascript × 4
jquery × 4
post-meta × 4
api × 4
thumbnails × 4
iframe × 4
custom-field × 3
widgets × 3
content × 3
save-post × 3
vimeo × 3