Youtube video size

Hello,

I am using the Wordpress editor to paste the youtube link and would like to know how can I make the video responsive.

Like in this page: https://www.ricardomaluf.com.br/11-habitos-praticos-para-combater-a-ansiedade/

I am trying to insert some CSS but I am being unable to make the video look always square, like an HD format, even in Iphone.

How do I do that please?

Thanks

Ricardo

Hi Ricardo,

Thank you for writing in, you said Wordpress editor, you mean the Gutenberg? you can use the Responsive Video shortcode

e.g.
[x_video_embed]<iframe width="560" height="315" src="https://www.youtube.com/embed/nqdni6c0ylQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>[/x_video_embed]

You can paste it on a Custom HTML block:

To get the embed code of the video:



Hope it helps,
Cheers!

Hello Friech,

I am using the classic editor. How would I do it in the classic editor?

And I would like to paste just the link, as I use to do in my previous theme. Is that possible?

Thanks

Hi Ricardo,

You can do the same thing that my colleague mentioned using the classic editor, you just simply need to hit the Text tab and not the View tab. Then you can paste the same code my colleague shared.

You can paste the link if you want, as WordPress interprets that and shows the video, but you will lose all the goodies of the shortcode usage as my colleague mentioned.

Thank you.

Hello Christopher,

Thanks a lot.

Now I am using the iFrame. But I am having problems with it also. The iFrame is cutting the sides of the video and showing just the middle area of the thumbnail.

How can I make it show the entire video thumbnail?

Thanks

Hey Ricardo,

I checked the page you posted and the sides are not cut-off.

Are you referring to another page? Also, ensure you’re using the Video Embed shortcode.

By the way, inserting the Youtube link directly to the WordPress Text Editor is called the WP oEmbed feature and the current version of our themes now support that.

We do not have support for iframe code only as it’s too generic therefore it can’t be specifically targeted for videos.

Hope that helps.

It helped. Thanks!

You’re welcome Ricardo!
We really appreciate for letting us know that it has worked for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.