Jump to content

Styling Footer on Search Page

Recommended Posts

Site URL: https://tuna-ladybug-3hgy.squarespace.com/search

Hi there,

I'm wondering how I can get a line above the footer section on my search results page like I have across the rest of the site. 

If that cannot be achieved, is there a way to hide the footer on the search page? The attachment is how it should look.

Site: https://tuna-ladybug-3hgy.squarespace.com/search?

Pass: brineintopedro

Screen Shot 2021-04-01 at 1.52.49 PM.png

Link to comment

Hey! What I'd recommend is a bit of Javacsript to see if a user is on the search page, and if they are, then add a class to the body. Then you can add some Custom CSS that could hide the footer, or style it however you'd like!

Place this in your site header code injection area.

<script>
  if (window.location.pathname == "/search") {
    document.querySelector('body').classList.add('search-page');
  }
</script>

Custom CSS:

.search-page #footer-sections{
  display:none;
}

Hope that helps!

Hey there, my name is Will and I help Squarespace designers and developers with my plugins, tutorials, and my Code Curious Membership
  
I would be happy to answer any questions you have about Javascript, CSS, or the meaning of life  - I'm an expert in 2 of these. 

Youtube | Website

Link to comment
  • 1 year later...
On 4/1/2021 at 6:55 PM, jdillagodzilla said:

Site URL: https://tuna-ladybug-3hgy.squarespace.com/search

Hi there,

I'm wondering how I can get a line above the footer section on my search results page like I have across the rest of the site. 

If that cannot be achieved, is there a way to hide the footer on the search page? The attachment is how it should look.

Site: https://tuna-ladybug-3hgy.squarespace.com/search?

Pass: brineintopedro

Screen Shot 2021-04-01 at 1.52.49 PM.png

please can you let me know how on the search page you have managed to get the results to come up on the same page? My site keeps taking me to an un-styled results page. Help!!

Link to comment
On 11/14/2022 at 9:27 PM, door1558 said:

please can you let me know how on the search page you have managed to get the results to come up on the same page? My site keeps taking me to an un-styled results page. Help!!

You can use above code to style result page

If you share link to your site + describe desired style, we can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.