Jump to content

Remove "Log In" in header from Access Denied Page

Recommended Posts

Site URL: https://icosahedron-orchid-nxj5.squarespace.com/member-portal


I have a member workaround for my site when accessing the Member Portal, and have removed the "login" from each page, but still kept the account on the member side. I have done this by injecting the below code to each page header code injection. However I cannot find how do do this for the Access Denied Page. I cannot find a page ID to target the header on this page only.

  .header-actions .user-accounts-link {
    display: none;

Any help would be greatly appreciated.


site is public




Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

7 hours ago, Heybyrt said:

I have removed the "login"...by injecting the below code to each page header code injection. However I cannot find how do do this for the Access Denied Page.

Instead of adding the CSS in page headers, you can add it to Design > Custom CSS (without the style tags):

.header-actions .user-accounts-link {
  display: none;

By default, this will apply to all pages (including the access denied page) but you'll be able to limit the effect by specifically excluding or including pages by referring to their unique Collection ID.


About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

Link to comment

Thanks Paul, I haven't done that as it removes the account button on the Member Portal Side.

Hence why I have applied it to the 5 public facing pages Home, About, Join, Events, Podcast & Contact. It works perfectly except when a user lands on the Access Denied Page, as it appears here, and without a page specific code injection, or Page#ID I cannot seem to target the header on this page, like the others.

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.