Jump to content

[Share] Add a video banner on top of product detail

Recommended Posts

If you want to add a video banner on top of product detail page, like this.

Add A Video Banner To Top Of A Product Use Footer Section 03 Min

You can use these code.

If it doesn't work on your site, you can send link to a product, I can check easier.

#1. First, edit Site Footer > Add a Section > Design layout what you want

image.png.d15683ed225e676586ee0f4c49b1ff14.png

Here is an example, I will add some info to this section.

and suppose this is the second section in the Footer

image.png.dcd1fc07290649a27fd39e81684dd1d9.png

#2. Use this code to Custom CSS box

footer.sections section:nth-child(2) {
  display: none;
}

image.png.82dcd77b9d7bc0e5ffc98753c895a635.png

#3. Edit product where you want video banner appears > Edit Additional Info > Add a Code Block > Paste the code

If you want to add this for all products, you can use code to Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  jQuery(document).ready(function($){
  $('footer.sections section:nth-child(2)').insertBefore('body[class*="type-products"].view-item article>section:first-child');
})
</script>

image.png.e1986425d5ba6f35bd0da4eb2fd9671f.png

Result

Add A Video Banner To Top Of A Product Use Footer Section 03 Min

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • Replies 0
  • Views 635
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.