Jump to content

Add custom code to "Accsess Denied Screen"

Recommended Posts

  • Replies 4
  • Views 898
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

6 hours ago, Sahil007 said:

I'm trying to add some custom code that will only affect the "Access Denied Screen". Specifically I'm trying to change the header color.

I'm not sure I understand.

You can add custom code to the Lock Page by adding it to Settings > Advanced > Code Injection > Lock Page. However, the Lock Page does not have a header.

Edited by paul2009

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Link to comment
2 hours ago, paul2009 said:

You can add custom code to the Lock Page by adding it to Settings > Advanced > Code Injection > Lock Page. However, the Lock Page does not have a header.

I'm trying to change the header color for the access denied screen when people try to access a members only page. I'll give this trick a go.

Link to comment

looks like you can use #sqs-member-access-page-root to access the div that contains the messages, as I can't see that id appearing in normal member pages, looks like it's just on that page. The components are

  • #sqs-member-access-page-root h2#headline
  • #sqs-member-access-page-root p#description
  • #sqs-member-access-page-root button.join-button
  • #sqs-member-access-page-root button.sign-in-button

image.thumb.png.545fa20e2c4377bf05fceb83f71289b2.png

so you can add something to your css like this:

 

#sqs-member-access-page-root h2#headline {
  color:red;
}
#sqs-member-access-page-root p#description {
  color:blue;
}
#sqs-member-access-page-root button.join-button {
  color:yellow;
}
#sqs-member-access-page-root button.sign-in-button {
  color:green;
}

image.png.6af73cd78161e80417c4d5933b6425dd.png

give it a try and see how you get on.

 

 

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Link to comment
  • 1 year later...

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.