0

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 look so big? In "Edit field group", in "Embed Size", i've set the video width as 400px and the height as 336px. But the embeded video on the posts is much bigger.

When i right-click on it and select "see embed code", i can see that the size is totally differnt:

<iframe width="795" height="596" src="https://www.youtube.com/embed/7u9erH5T_-g" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

How can i change this?

  • what's the embed code you put in? – Vishwa May 2 at 6:40
  • I didn't put any embeded code, just the video link like this: youtube.com/watch?v=7u9erH5T_-g – Draws Ren Gundam May 2 at 6:55
  • It's big because your theme (Divi) is using FitVids to make the video embeds responsive. A side effect of this is that it makes the videos 100% wide. You either need to turn it off (ask the theme author how, it might require code) or put the video embed into another container with a fixed width. – Jacob Peattie May 2 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.