How to set default width of video when entering video URL?

Community Forums Forums General Discussion How to set default width of video when entering video URL?

This topic is: resolved

This topic contains 7 replies, has 3 voices, and was last updated by  LauraB 12 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #68918

    LauraB
    Participant
    Post count: 14

    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/
    #68919

    emasai
    Participant
    Post count: 738

    When you get the embed code from YouTube you can customize the dimensions you want. Yours is set at 500px wide.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    #68920

    LauraB
    Participant
    Post count: 14

    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.

    #68924

    emasai
    Participant
    Post count: 738

    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.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    #68975

    LauraB
    Participant
    Post count: 14

    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.

    #68986

    AC
    Blocked
    Post count: 7712

    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.

    [php]if ( ! isset( $content_width ) ) $content_width = 600;[/php]

    I originally found this here.

    #68989

    emasai
    Participant
    Post count: 738

    Interesting, I learn something every day.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    #69557

    LauraB
    Participant
    Post count: 14

    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!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘How to set default width of video when entering video URL?’ is closed to new replies.