WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce Video Product Tab
[resolved] Video Tab Video Size (8 posts)

  1. stoelwinder
    Member
    Posted 10 months ago #

    So far the plugin does pretty much what I want it to do and I love it's potential. However, I seem to be experiencing a weird issue with regards to the video size. When I try to include a video the video width is much bigger than the content area:

    http://stoelwinder.net/gameshomeshop/uncategorized/test-product-4/

    Any idea how this could be fixed? I tried forcing it with width in the URL but that doesnt seem to work..

    http://wordpress.org/plugins/woocommerce-video-product-tab/

  2. Sebastien D
    Member
    Plugin Author

    Posted 10 months ago #

    Try this.

    <iframe width="550" height="320" src="http://www.youtube.com/embed/9kU5Sp9d3LM?feature=oembed" frameborder="0" allowfullscreen=""></iframe>

  3. stoelwinder
    Member
    Posted 10 months ago #

    Thank you, that worked! And to make it automatically apply these size requirements, I edited the functions.php file and added the following:

    add_filter( 'embed_defaults', 'bigger_embed_size' );
    
    function bigger_embed_size()
    {
      return array( 'width' => 550, 'height' => 310 );
    }
  4. Sebastien D
    Member
    Plugin Author

    Posted 10 months ago #

    I'm glad it worked and thank you for the filter code. I will apply this to the documentation of the plugin.

  5. Sebastien D
    Member
    Plugin Author

    Posted 10 months ago #

    I have updated the documentation with your filter stoelwinder and credited you for it.

  6. Ovidiu
    Member
    Posted 3 months ago #

    Unfortunately the code for functions.php does absolutely nothing for me. Check it out live here: http://www.ict-consult.co.za/shop/car-seats/maxi-cosi-rodi-car-seat/

    Any ideas?

    The embed code is and the above code from my functions.php should have worked, right?:

    <iframe width="640" height="360" src="http://www.youtube.com/embed/Zp6fUHSjHkI?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>

  7. Sebastien D
    Member
    Plugin Author

    Posted 3 months ago #

    This topic has been resolved and the video appears to load and play for me on your webpage.

  8. Ovidiu
    Member
    Posted 3 months ago #

    BUT the initial question was about the size of the VIDEO. THE youtube video shown in my example is 640px width and I am using this code:

    add_filter( 'embed_defaults', 'bigger_embed_size' );
    
    function bigger_embed_size()
    {
      return array( 'width' => 550, 'height' => 310 );
    }

    But it doesn't get "resized" down to 550px width...

    Shall I open a new thread?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.