How to have a different logo on different pages? (Brooklyn theme)

Hi, I am looking for a solution to use different colored logos on different pages of my site (https://lotushausstudio.com/)

On my home page, I would like the uploaded logo image to be white. On all my other pages, I would like it to be red. I’ve uploaded both in my Assets folder.

I’ve read a few articles, and it seems like I need to insert an IF condition…but none of the articles have helped :disappointed_face: This is the code I tried inserting within the header ( and ) of my theme.liquid file:

{% if template.name == “index” %}

{% else %}

{% endif %}

Any idea where I went wrong?

Articles I referenced: https://community.shopify.com/c/Shopify-Design/How-to-have-a-different-colour-of-logo-on-different-pages/td-p/750916

https://shopify.github.io/liquid-code-examples/example/header-logo

Hi @lotushaus

you should not insert the code between tags of theme.liquid file

The code should be inserted in the file that manage the logo presentation. In case of Brooklyn this file is header.liquid

At around line 157 (Brooklyn 17.6.0) you’ll find this code


and you have to change it based on your logic.

Hi, thanks for guiding me in the right direction. I’m a noob at coding though, and don’t really know how to change it based on my logic… how can I have the code show the white-logo on the home page, and show the red-logo on all other pages?