JButler Posted June 17, 2020 Share Posted June 17, 2020 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 comment
tuanphan Posted June 17, 2020 Share Posted June 17, 2020 I think you can with CSS. If you share link to page where you inserted events summary. We can check easier. Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Solution RyanDejaegher Posted June 17, 2020 Solution Share Posted June 17, 2020 @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 JButler and dnmddy 2 Philadelphia, PA 👉 Squarespace Tutorials Chat/Message on FB Messenger for quickest response: https://m.me/dejaegherryan Link to comment
Beanie Posted December 30, 2020 Share Posted December 30, 2020 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 comment
tuanphan Posted January 5, 2021 Share Posted January 5, 2021 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; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Beanie Posted January 27, 2021 Share Posted January 27, 2021 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 comment
tuanphan Posted February 2, 2021 Share Posted February 2, 2021 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; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
CodyRainwater Posted December 23, 2021 Share Posted December 23, 2021 On 12/30/2020 at 8:23 AM, 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 This also wasn't working for me until I removed the case. Did you try: a[href="/print-shop?category=last-chance"] { color: red !important; } once I made everything lowercase and slapped and important tag on it, it worked. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment