Jump to content

Add text to only one category product page

Recommended Posts

Posted

Site URL: https://studioroserentals.com

Hello, 

I am trying to add a text section to the bottom of one of the category page but it is applying to all product pages. For example when I add a section to the *backdrops* page it adds the same section to the general store page and each of the other category pages as well (decor, dinnerware, furniture). Is it possible to add a section to the Backdrops section only? 

Thanks! 

  • Replies 4
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...
Posted
On 3/6/2022 at 2:01 AM, tuanphan said:

Hi. Add text, then we will give the code to show texton Backdrops page only.

Do you have the code for this?

Posted (edited)
On 6/17/2024 at 9:46 PM, twostudios said:

Do you have the code for this?

Suppose I have this product category page

https://tuanphan3.squarespace.com/store-wrap-1/plane?noredirect

pass: abc

To add custom text, I will use this code to Website Tools (under Not Linked) > Custom CSS

body:has(a.category-link.root.active[href="/store-wrap-1/plane"]) section.products.collection-content-wrapper:before {
    content: "PLANE \A Remind me to thank John for a lovely weekend. They're using our own satellites against us. And the clock is ticking";
    white-space: pre-wrap;
  display: block;
  text-align: center;
 }

image.thumb.png.de5b0147c386da2b3a900cf63b9a9b46.png

if product category like this: https://tuanphan3.squarespace.com/store-wrap-1/bike?noredirect

CSS code will be

body:has(a.category-link.root.active[href="/store-wrap-1/bike"]) 
 section.products.collection-content-wrapper:before {
    content: "BIKE \A Remind me to thank John for a lovely weekend. They're using our own satellites against us. And the clock is ticking";
    white-space: pre-wrap;
  display: block;
  text-align: center;
 }

image.thumb.png.07101822f4ac30b6c031949f45d47915.png

Edited by tuanphan
update image

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!)

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.