add a logo to a custom header / debut theme

Highlighted
Tourist
12 0 1

Hello everybody, 

 

I made a separate header for a few pages but I'm having trouble keeping the logo icon in it.

As the header doesn't turn up in "Customize" because it is custom, and I can't pick the icon there, I need to do something here I suppose, but I'm not sure exactly what:

 

{% if section.settings.logo %}
            {%- assign img_url = section.settings.logo | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
            <a href="https://optiie.com/pages/security" class="site-header__logo-image{% if section.settings.align_logo == 'center' %} site-header__logo-image--centered{% endif %}">
              {% capture logo_alt %}{{ section.settings.logo.alt | default: shop.name }}{% endcapture %}
              <img class="lazyload js"
                   src="{{ section.settings.logo | img_url: '300x300' }}"
                   data-src="{{ img_url }}"
                   data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
                   data-aspectratio="{{ section.settings.logo.aspect_ratio }}"
                   data-sizes="auto"
                   alt="{{ logo_alt | escape }}"
                   style="max-width: {{ section.settings.logo_max_width }}px">
              <noscript>
                {% capture image_size %}{{ section.settings.logo_max_width | escape }}x{% endcapture %}
                <img src="{{ section.settings.logo | img_url: image_size }}"
                     srcset="{{ section.settings.logo | img_url: image_size }} 1x, {{ section.settings.logo | img_url: image_size, scale: 2 }} 2x"
                     alt="{{ section.settings.logo.alt | default: shop.name }}"
                     style="max-width: {{ section.settings.logo_max_width }}px;">
              </noscript>
            </a>
          {% else %}
            <a class="site-header__logo-link" href="https://optiie.com/pages/security">{{ shop.name }}</a>
          {% endif %}

As header.liquid can't find the data for section.settings.logo, it's going to "else" and outputs the shop.name text.

Here I'm thinking of instead just hardcode my icon into it and I'd  appreciate any pointers as to how to do that.

Thanks guys!

Pelle

0 Likes