Osman01 Posted February 24, 2023 Share Posted February 24, 2023 Hiya, Is there a way to hide banner cards on specific pages with CSS coding?. I'd like to have it only on the first and last page of the Banner:Slideshow . (Professional and University pages ). web: osman-b-zaman.squarespace.com pass: PASS700 Kind Regards Link to comment
creedon Posted February 24, 2023 Share Posted February 24, 2023 (edited) Add the following to Page Settings > Advanced > Page Header Code Injection for the pages. Please see per-page code injection. <style> /* Professional */ #collection-63e9834599b6e26300a46311 .user-items-list-banner-slideshow .list-item[ data-is-card-enabled="true" ]:not( :first-child ):not( :last-child ) .list-item-card-background, /* University */ #collection-63ac6ed12bd73d77884af291 .user-items-list-banner-slideshow .list-item[ data-is-card-enabled="true" ]:not( :first-child ):not( :last-child ) .list-item-card-background { display : none; } </style> Let us know how it goes. Edited February 25, 2023 by creedon version 2 Osman01 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Osman01 Posted February 24, 2023 Author Share Posted February 24, 2023 Thx, is there a workaround without upgrading to business plan? Link to comment
Solution creedon Posted February 25, 2023 Solution Share Posted February 25, 2023 (edited) 21 hours ago, Osman01 said: is there a workaround without upgrading to business plan? Yes. Add the following to Design > Custom CSS. // hide user list item card background except first and last, uses LESS syntax #collection-63e9834599b6e26300a46311, // Professional #collection-63ac6ed12bd73d77884af291 // University { .user-items-list-banner-slideshow .list-item[ data-is-card-enabled="true" ]:not( :first-child ):not( :last-child ) .list-item-card-background { display : none; } } Let us know how it goes. Edited February 25, 2023 by creedon version 2 Osman01 and tuanphan 2 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
creedon Posted February 25, 2023 Share Posted February 25, 2023 6 hours ago, Osman01 said: Checked the CSS code and I received "Syntax Error on line 4". Apologies for the issues. Not sure how the syntax errors got there. I did get the logic wrong for which ones you wanted to show/hide. I updated my code and made it less verbose as a bonus. If you use the new code it should be easier to maintain. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Osman01 Posted February 26, 2023 Author Share Posted February 26, 2023 Thanks! creedon 1 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