Different max embed width on page without sidbar

Community Forums Forums Design Tips and Tricks Different max embed width on page without sidbar

This topic is: not resolved

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  braddalton 11 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #61762

    Tal
    Participant
    Post count: 19

    I’m using the following code in my function file, mostly to auto size youtube embeds, but on pages where I have no sidebar I’d like to have a wider embed with, can someone help me out with code to achieve this?

    function mycustom_embed_defaults($embed_size){
        if( is_single() ){ // If displaying a single post
            $embed_size['width'] = 600; // Adjust values to your needs
            $embed_size['height'] = 600;
        }
    #61872

    braddalton
    Participant
    Post count: 9192

    Link to your site please with the fill width layout.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #61895

    Tal
    Participant
    Post count: 19

    My theme is modified from the Backcountry theme.

    the width of the full page layout content area is 910

    #62658

    Tal
    Participant
    Post count: 19

    So nobody has any suggestions? Surely this is possible?

    #62795

    braddalton
    Participant
    Post count: 9192

    Hello Tal

    I wrote about this recently and also use the solution on my own site however i would like to look at the page in question so i can tailor the code to your specific needs.

    That way it will work the first time as i can also test it locally on your theme.

    Please link to the page in question. Thanks


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.