background video on every page. I only want it to show up on homepage

Hi, I coded in a background video to my website but it shows up on all of my pages. I only want to be present in my homepage. I use the impulse theme.

When I went into the code, I went to sections folder and added a new section titled “homepage-video.liquid” and added this code (the red text is the file link for the video):

{% schema %} { "name": "Homepage Video", "class": "index-section index-section--flush", "settings": [], "presets": [{ "name": "Homepage Videos", "category": "Text" }] } {% endschema %} {% stylesheet %} .section-homepage-video{ width:100%; } .video-homepage{ width: 100%; height: auto; } {% endstylesheet %} {% javascript %} {% endjavascript %}

After adding this, the video plays exactly the way I want, it just shows up on all pages instead of just the homepage. Is this a coding issue on my end?

Hi @jastan

Please, share your store URL. Thanks!

The website url is modusimo.com and password is “eclipse”

thanks!

Thanks for the info, try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “theme. Liquid” file. Find the tag and paste the code below before the tag.
{% unless template.name == 'index' %}

{% endunless %}
  • And Save.

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

You are amazing!! Thank you so much!!!

Welcome! :blush:

yo i am having this same issue!