Jump to content

Hide Pages within Members Area/Site

Recommended Posts

I'm looking for code to hide pages within a Membership Area. I tried the following code as header injection, but it broke the formatting of the header and other fonts throughout the site.  Please advise. 

 

<style>

/* hide page from member area navigation on desktop */

.header-nav-item--folder [href="/skill-swap-form"] {

   display: none !important;

  }

 

/* hide page from member area navigation on mobile */

@media (max-width: 640px) { /* or any other mobile breakpoint */

  .header-menu--folder-list [href="/skill-swap-form"] {

    display: none;

  }

 

Link to comment
4 hours ago, ChristinaDean said:

I'm looking for code to hide pages within a Membership Area. I tried the following code as header injection, but it broke the formatting of the header and other fonts throughout the site.  Please advise. 

 

<style>

/* hide page from member area navigation on desktop */

.header-nav-item--folder [href="/skill-swap-form"] {

   display: none !important;

  }

 

/* hide page from member area navigation on mobile */

@media (max-width: 640px) { /* or any other mobile breakpoint */

  .header-menu--folder-list [href="/skill-swap-form"] {

    display: none;

  }

 

You have not add the closing tag. Can you try with the code below? Let me know if it work.

<style>
  /* hide page from member area navigation on desktop */
  .header-nav-item--folder [href="/skill-swap-form"] {
    display: none !important;
  }

  /* hide page from member area navigation on mobile */
  @media (max-width: 640px) { 
    /* or any other mobile breakpoint */
    .header-menu--folder-list [href="/skill-swap-form"] {
      display: none !important;
    }
  }
</style>

 

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

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.