Jump to content

Change background color or add image to search results page

Recommended Posts

Site URL: https://www.findliberty.net/search-tool

So theoretically easy question. When you visit: https://www.findliberty.net/search-tool, you see an image of a keyboard. But when you perform a search query, the image goes away and the white menus and logo are no longer visible because its a white background. I found another thread with a footer/header code injection but that didn't work. Any ideas? Prefer to have the image there, but if could just have a non-white background would be great tool.

Link to comment

Add to Code injection Header

if (document.location.pathname.indexOf("/search") == 0) {
  body.sqs-search-page header.Header.Header--bottom {
    background-image: url(https://images.squarespace-cdn.com/content/v1/5953de722cba5e08ef12a358/1507834510203-6149A18DFD38L5IG6APF/ke17ZwdGBToddI8pDm48kFmfxoboNKufWj-55Bgmc-J7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0iXS6XmVv7bUJ418E8Yoc1hjuviiiZmrL38w1ymUdqq4JaGeFUxjM-HeS7Oc-SSFcg/keybard+with+phone.jpg?format=1500w);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    padding-bottom: 50px;


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
  • 1 year later...
18 minutes ago, BurningOaksNI said:

whenever i try injecting the above into custom css it tells me there's a syntax error

The code isn't CSS. It must be added to the Code Injection panel (within Settings > Advanced), not the Custom CSS panel.

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

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.