Support Forum

Adjust embedded videos width in posts

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Since WP has removed the max width from the embedded media, how can I make the videos fit in my posts? SP has the option but seems that it only works with text and images

http://www.subnoise.es/foro/general/la-reunion-de-nirvana/#p44550

 

11 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

When did they remove this? The settings are still available in the media settings?

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

On the new version (3.5) they removed the oEmbed settings

http://codex.wordpress.org/Settings_Media_Screen

YS Yellow Swordfish
Yellow Swordfish
Member

Ah – you mean this: ‘Remove oEmbed options from the Settings Media Screen. Width adheres to theme’s content width, height is 1.5 times width’.

Shouldn’t make any difference really – actually should be better. But I will investigate to see if we can add some CSS to give it some right hand margin on forum posts.

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Ok, let me know if there’s anything I can try in the meantime

YS Yellow Swordfish
Yellow Swordfish
Member

You could try something like this – try adding it to WP theme CSS or even the forum theme CSS:

#spMainContainer embed,
#spMainContainer iframe,
#spMainContainer object,
#spMainContainer video {
    max-width: 95%;
}

See if that helps at all…

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I added this to the default.php, worked like a charm!

.spPostContent p iframe { max-width: 100%; }

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

Which is rather strange as you can’t put an iframe in a paragraph and a max of 100% is exactly what WP already set it to! So it shouldn’t really make any difference!

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

I guess it takes the 100% of the spPostContent

 

YS Yellow Swordfish
Yellow Swordfish
Member

I have to say I have never heard of it and I don’t recall that name ever coming up on the support forum. How does it work? And what does it do?

JV Joan Alamo Vallejo
Joan Alamo Vallejo
Member

Oh, I just deleted the comment because I figured out what was wrong with Embedly

Anyway I’ll tell you in case you’re interested… It’s a WP plugin that allows you to embed almost everything, from brightcove videos to bandcamp playlists. It’s free if you make less than 10K requests a month

YS Yellow Swordfish
Yellow Swordfish
Member

Ok – so does that mean you now have it working? It sounds interesring.