Different logos for different pages Debute theme

How do I add different logos for different collection pages on my website? Debute theme.

Are you talking about the logos in the navigation menu?

The logo in the header.

How many different logos were you planning to show?

Was looking to switch between 3 logos. 1 main one and 2 sub categories.

Hello @Braeden123

This is all about the theme code:- below is the example -

  1. Online Store > Themes.

  2. click on the “Actions” button. Select “Edit Code”.

  3. open the “header.liquid” file.

  4. look for the following code that displays the logo in the header section:


  

  1. Replace the above code with the following code that uses a conditional statement to display different logos based on the collection page:
{% if collection %}
  {% case collection.handle %}
    {% when 'collection-handle-1' %}
      
        
      
    {% when 'collection-handle-2' %}
      
        
      
    {% else %}
      
        
      
  {% endif %}
{% else %}
  
    
  
{% endif %}

Above the code, you need to replace 'collection-handle-1’ and ‘collection-handle-2’ with the actual handles of your collection pages. Additionally, update ‘logo-1.svg’, ‘logo-2.svg’****, and ‘default-logo.svg’ with the file names of your different logos and default logo.

  1. save the changes.

  2. Upload the different logos (logo-1.svg, logo-2.svg, etc.) to the “Files” section in your Shopify admin.

Hi thank you so much for the help. I am getting this response when plugging in the code.

Fixed the initial problem. When I plug in the correct collections handle as well as the correct logo files it doesn’t seem to work.

Great! Noticed you got some help, were you able to figure it out?

Hi yes almost! still having trouble with some of the code provided. Here’s what I’m having trouble with.When I plug in the correct collections handle as well as the correct logo files it doesn’t seem to show up on my website. Do you possible have any fixes for this? Here’s the code I’m working with.

Once you pasted that code, what happened? Did your current logo disappear, or does it still show?

The current logo stayed, nothing else happened.

Hi @Braeden123

Please refer the below video to impliment the same

Hope this help…