Jump to content

Hide a block in editor, but show on live site?

Recommended Posts

Hello! I've searched high and low with no luck. Is there a string of code that would hide a text block only while in the editor? For example, a site credit that is visible on the live site but cannot be updated or removed in the editor.

I considered using a psuedo element, but wondered if this option would be possible as it's much cleaner.

Link to comment
  • Replies 4
  • Views 174
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

48 minutes ago, mbockmaster said:

visible on the live site but cannot be updated or removed in the editor

What are you trying to achieve with this? Prevent someone with "Content Editor" permissions from editing this credit?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

Interesting, try this as a starting point:

#footer-sections .page-section:last-of-type {
  p:last-of-type:after {
    content:"this is a site credit: made by Ziggy";
    display:block;
  }
}

It will add a piece of text after the last paragraph in the footer.

I am intrigued to learn more about what your intention is!? Why the subterfuge?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

@Ziggy, thank you! I've decided not to pursue it after all. I'm doing a site pro bono, with the caveat that my site credit must remain on the site. Having been burned in the past, I thought a slightly more difficult to remove credit would give me peace of mind. But I suppose that's what a contract is for! Thanks for the help anyway 🙂

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.