Jump to content

Charge floating buttons to only one page

Recommended Posts

Hey team!

I have found some great resources in the forum and managed to make an awesome floating button "BUY NOW" but can't find any code in this form that helps me limit it to only the HOME page, with the code that I am using.

(Input into Custom CSS)

Code is:

footer.sections .button-block {
    position: fixed;
    bottom: 3vw;
    right: 3vw;
   width: 100px;
    height: 50px;
    display: block !important;
    z-index: 99999;
}
footer.sections section, footer.sections {
    z-index: 99999 !important;
}

 

Button scrolls perfectly like below image. I just want it only on my home page however, no other page.

 

Any help would be greatly appreciated!

IMG_4663.jpg

Link to comment
  • Replies 3
  • Views 734
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

If you use the button's block ID and the page's ID you can hide it on every other page. If you share your website URL I can help with more detail, but something like this:

body:not(#collection-page-id) {
  #button-block-id {
    display:none;
  }
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Took me about 2 hours of siting through Google and the Forum to realise I needed to be in Chrome to find the ID's. But I found them and I've tried what you suggested and it doesn't seem to work.

My website isn't live yet, so I don't have the URL for it all.

Screenshot 2024-08-09 at 1.06.52 PM.png

Link to comment

You are missing the # from the beginning of the block ID. It should start:

#block-4a08.........

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

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.