githubEdit

Embed YouTube videos

Use a Custom Liquid block to add a YouTube video anywhere in Paper where blocks are supported.

Add a YouTube embed

  1. In Shopify admin, go to Online Store > Themes.

  2. Click Customize on your active Paper theme.

  3. Navigate to the section where you want to show the video.

  4. Add a Custom Liquid block.

  5. In YouTube, open your video, click Share > Embed, and copy the embed code.

  6. Paste the embed code into the Custom Liquid block, then save.

Example:

<span>
  <iframe
    width="560"
    height="315"
    src="https://www.youtube.com/embed/ALiyPTbL8Rg?si=rQKonpMMXeYSjJGC"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin"
    allowfullscreen
  ></iframe>
</span>

Make the video full width (optional)

If you want the video to scale to the full width of its container, wrap each embed in a .video-wrapper element and add the CSS below.

Support note: If the responsive styling does not apply, place the <style> block before the first <div class="video-wrapper"> block in your Custom Liquid content.

To add multiple videos, repeat the <div class="video-wrapper">...</div> block for each video.

Last updated

Was this helpful?