October 25, 2013 at 2:40 pm #68918
I can successfully get a youtube video to show in a post when pasting a URL. The video always posts to a width of 500, but the content area of my post could handle something more like 600 or 640 wide.
I know you can add shortcodes to a link to set what the width/height is. However is there a way to set the default width so that I don’t have to add those shortcodes each time?
I am using the Video post format if that makes a difference. Customized Metro Pro. Link included, if needed user/pass: studiopress.
Any help appreciated!http://development.danceworksstudio.com/2013/10/24/foxcha-by-kylie-and-taylor/October 25, 2013 at 2:45 pm #68919
When you get the embed code from YouTube you can customize the dimensions you want. Yours is set at 500px wide.
October 25, 2013 at 2:54 pm #68920
Thanks Lynne for your quick reply.
In this case my post has just the URL. I’m literally just entering: http://www.youtube.com/watch?v=jIR49Wa7fZ8
(Hope that comes across) into my post.
And what is cool is that it does automatically does the embedding. So somewhere (WP, Genesis, YouTube?) is deciding what size to show it at.
I’m wondering if there’s somewhere I can adjust this default. While I can remember to add shortcodes to adjust the size, most of the staff that will do the posting isn’t techy, so having a way to adjust this default would be handy.October 25, 2013 at 3:00 pm #68924
YouTube provides you with a customized solution for your embed link. When you get the code for the video from YouTube, don’t use the generic “watch” link. Beneath the video go to Share – Embed – below the iframe code to copy is Video Size, you can choose from the drop down menu or click custom and enter the size you want. Then you simply code the code and enter that into WP.
October 25, 2013 at 7:46 pm #68975
Sorry Lynne, I guess I’m not being clear.
I already know how to adjust the link with shortcodes, and how to edit the embed code to change the size.
The issue is I want the staff to be able to just paste a URL. I don’t want them to have to do a bunch of things with shortcodes or embed code, it will be too hard for the non-techy staff. My question is…. is there a way that I can preset the default width, so that later with the non-technical staff just pastes a video URL it will default to the preset width that I have set.
Perhaps it is not possible, but if so that’s what I’d like to know.October 25, 2013 at 8:03 pm #68986
There used to be a setting for this but they removed it. Try adding this to your functions.php file and change 600 to whatever width you want it to be.
if ( ! isset( $content_width ) ) $content_width = 600;
I originally found this here.October 25, 2013 at 8:34 pm #68989
Interesting, I learn something every day.
October 28, 2013 at 7:03 pm #69557
Thank you anitac. This work’s well.
And emasai you are correct in that I’d prefer staff to use a more sophisticated way to post, as then they can adjust even more of the default options. But at least now if they don’t do it that way, or can’t figure it out, and least the video is a good width with just a URL paste.
Thank you both!
The topic ‘How to set default width of video when entering video URL?’ is closed to new replies.