Jump to content

Hide banner cards on specific pages?

Go to solution Solved by creedon,

Recommended Posts

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 by creedon
version 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
  • Solution
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 by creedon
version 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
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

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.