Jump to content

Code injection Displaying Div in Header of Shop Page

Recommended Posts

Site URL: https://iris-owl-xay3.squarespace.com/

https://iris-owl-xay3.squarespace.com/

Password test

 

I am trying to add Paypal credit banner after add to cart button. I was able to add the this  banner to all products by using adding below code in Shop page header page code injection. The code was below 

<div class="paypalcredit"
     style="margin-top:30px;"
    data-pp-message
    data-pp-style-layout="flex"
    data-pp-style-ratio="8x1"
    data-pp-style-color="white-no-border"
    data-pp-amount="ENTER_VALUE_HERE">
</div>   
<script>
   $(function() {
     $(".paypalcredit").insertAfter(".sqs-add-to-cart-button-wrapper");        
   });
</script>

 

It is working fine like below 

image.png.1ac12cbb2a0c2578ae42561221e9e63c.png

 

Now the issue is the shop page is also started showing banner over the menu like below . I don't want the banner to be displayed like this on menu. 

image.thumb.png.929157973e8c44cd73766c20b5efcdae.png

 

 

image.png

Link to comment
  • Replies 1
  • Views 483
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.