Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Can you define categories with specific colours?


JButler
Go to solution Solved by RyanDejaegher,

Question

For an events summary section, I would like to make different categories appear in specific colours under the event thumbnail. Is this possible? For example, 'Category A' will appear in green text, and 'Category B' will appear in red etc...

Thanks!

Link to post
  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

@JButler yes you can customize the style for category links, you'll need to copy the link/url and copy it to the code below. You can do this with blog categories or shop categories.  /* Add this c

Posted Images

6 answers to this question

Recommended Posts

  • 0

@JButler yes you can customize the style for category links, you'll need to copy the link/url and copy it to the code below. You can do this with blog categories or shop categories. 

/* Add this code to Design -> Custom CSS */

a[href="/shop?category=tumblers"] {
  color: red;
}

a[href="/shop?category=straws"] {
  color: blue;
}

Here's an example from another site with this code in place
image.thumb.png.cd0eaf57f876fa426a577019cc2b391b.png

Philadelphia, PA

👉 Squarespace Tutorials 

Chat/Message on FB Messenger for quickest responsehttps://m.me/dejaegherryan

 

Link to post
  • 0

Hi - 
I have tried using the code above, but I couldn't get it to work for my site - does anyone have any suggestions. 

I have tried a number of different inputs - original here. 

a[href="/shop?category=tumblers"] {
  color: red;
}

This is what I have input

- a[href="/Print-shop?category=Last-Chance"] {
  color: red;
}

The category I am trying to make red is "Last Chance" in Categories it is written with capitals like that "Last Chance" and the SHOP is Print shop or the url is /prints

Thanks for your help. 
Beanie



 

Link to post
  • 0
On 12/30/2020 at 10:23 PM, Beanie said:

Hi - 
I have tried using the code above, but I couldn't get it to work for my site - does anyone have any suggestions. 

I have tried a number of different inputs - original here. 


a[href="/shop?category=tumblers"] {
  color: red;
}

This is what I have input

- a[href="/Print-shop?category=Last-Chance"] {
  color: red;
}

The category I am trying to make red is "Last Chance" in Categories it is written with capitals like that "Last Chance" and the SHOP is Print shop or the url is /prints

Thanks for your help. 
Beanie



 

Try this code. If it doesn't work, please share site url, we can check easier

a[href*="Last-Chance"] {
  color: red !important;
}

 

Link to post
  • 0

Hi, thank you - I finally tried this - with a different category, as I currently do not have "Last Chance" active. 
I tried this: 
a[href*="Mountains"] {
  color: red !important;
}

For the Mountain category: https://www.terorepo.com/prints

but it did not work, so any help appreciated. Many thanks - does that URL work ok? 
Cheers 
 

Link to post
  • 0
On 1/27/2021 at 7:12 AM, Beanie said:

Hi, thank you - I finally tried this - with a different category, as I currently do not have "Last Chance" active. 
I tried this: 
a[href*="Mountains"] {
  color: red !important;
}

For the Mountain category: https://www.terorepo.com/prints

but it did not work, so any help appreciated. Many thanks - does that URL work ok? 
Cheers 
 

Your typo

a.nested-category-breadcrumb-link[href*="mountains"] {
    color: red;
}

 

Link to post

Create an account or sign in to comment

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


×
×
  • Create New...