Support » Plugin: Sell Downloads » YouTube embed

  • Resolved rachelsingasong

    (@rachelsingasong)


    Hi,

    Thanks so much for such a great plugin.

    How can embed a YouTube video in the description of my product?
    I’m selling PDF sheet music files but my customers may want to watch the video before buying.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @rachelsingasong

    You can simply insert the YouTube video into the content of product.

    Best regards.

    rachelsingasong

    (@rachelsingasong)

    Yes I know that,but I want to resize the video to a smaller size.
    Sell downloads plugin doesn’t allow that

    Plugin Author codepeople

    (@codepeople)

    Hello @rachelsingasong

    The question is not related directly with our plugin, it is simply CSS and HTML. Please, follows the steps below:

    1. Go to the WordPress menu option: “Appearance > Customize > Additional CSS”

    2. Enter the following style definition:

    
    .video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px; height: 0; overflow: hidden;
    }
    
    .video-container iframe,
    .video-container object,
    .video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    }
    

    3. Finally, you should to insert into the content of the products the iframe tag generated by Youtube for the video, into a div tag with the class name “video-container”, defined previously, as follows:

    
    <div class="video-container"<iframe width="640" height="390" src="https://www.youtube.com/embed/Quosrug9pgo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
    

    and that’s all.
    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘YouTube embed’ is closed to new replies.