Jump to content

Footer no longer displayed because of code block, can't reverse it

Recommended Posts

Hello,

I tried to hide my footer on one page, but I made the mistake of adding the following code into a code block in my footer (I now deeply regret it):

.header, #footer-sections {
display:none !important;
}

I thought great! It's working, until I realised the change applied to all of my website pages and not on that single page only.

So now I've been trying to get my footer back, but the whole footer being disabled thanks to that code block, I can't do anything. It's not being visible anywhere which means that I can't access the code block and delete it.

I went into the inspect Elements of Chrome, I found the footer sections and changed "none !important" to "block !important".

It seems to work when I edit the code, the footer is visible again, only I cannot edit anything nor can I save anything in the inspect Elements. Meaning back to square one with a hidden footer on each and every one of my pages.

Could you please help? Is there any way for me to retrieve the footer so that I can delete that code block once and for all? I'd rather have a footer on every page than none at all.

Many thanks

Edited by Sylva8787
Link to comment

Problem solved eventually, editing in safe mode made the trick - in case anyone's interested 😉 

Though if you know of a css code to remove the footer from one portfolio page only (and not from all the pages of my portfolio), I'm all ears!

Many thanks

Link to comment

To provide a definitive answer, we'll need you to share the URL so that we can see the page where you'd like to remove it.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 1 month later...
1 minute ago, SuperDJ said:

I locked myself out

You can put your site into a "safe mode" that prevents custom code from loading by adding "/safe" to the config url like this, where "your-site" is the built-in domain of your own site. 

https://your-site.squarespace.com/config/safe/

You can then log on and edit or remove the code.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
On 4/23/2022 at 5:38 PM, Sylva8787 said:

Problem solved eventually, editing in safe mode made the trick - in case anyone's interested 😉 

Though if you know of a css code to remove the footer from one portfolio page only (and not from all the pages of my portfolio), I'm all ears!

Many thanks

Hi Sylva8787!

I am having the same problem and I was wondering if you can help me to solve it becuse I ahve to present this to my client and I really don't know how to fix it. I tried to look on inspector of google but couldn't find it .

Link to comment

@melissahuarcaya

Did you follow @paul2009's advice above? Once that is done you should be able to access the offending code and fix it.

Make sure after the fix you take the site out of safe mode.

Edited by creedon

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
  • 1 year later...

I am having the same problem. I go into safe mode and my header and footer are again visible. When i check code injection and custom code I don't see any code. Header and footer are missing site-wide. 

movementmedicine.coach.

thanks!

Link to comment
2 hours ago, drdon23 said:

When i check code injection and custom code I don't see any code.

The code that is hiding the header and footer are in code blocks in the content of each page. Remove them or do something like the following...

<style>

  html:not( .squarespace-damask ) .header,
  html:not( .squarespace-damask ) #footer-sections
  
    {
    
      display : none;
      
      }
      
  </style>

I prefer to put these kinds of customizations in the Page Header Code Injections for each page instead of a code block as the later has a tendency to get lost in the mix.

Let us know how it goes.

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.