Shopify themes, liquid, logos, and UX
With my past developers we were able to create a button that switches from light mode to dark mode. I now want to change the image of the button. I've looked through base css and theme liquid to see if there was any "img src" that I could just change the url, but I haven't found it. Please help me change this candle image on the button
URL: https://cureblame.com/collections/all#
password:shhhbequiet
Solved! Go to the solution
This is an accepted solution.
@cureblame - it is announcement bar section, so go to your theme files and check if you have separate section file like announcement-bar.liquid or announcement.liquid etc, you can search by name
I don't see the img src or way to change the img on announcement-bar-liquid, here's the code
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when 'announcement' -%}
<div class="announcement-bar color-{{ block.settings.color_scheme }} gradient" role="region" aria-label="{{ 'sections.header.announcement' | t }}" {{ block.shopify_attributes }}>
{%- if block.settings.text != blank -%}
{%- if block.settings.link != blank -%}
<a href="{{ block.settings.link }}" class="announcement-bar__link link link--text focus-inset animate-arrow">
{%- endif -%}
<div class="page-width">
<a href="#" class="darkmode-button" id="dmbutton"></a>
<p class="announcement-bar__message h5">
{{ block.settings.text | escape }}
{%- if block.settings.link != blank -%}
{% render 'icon-arrow' %}
{%- endif -%}
</p>
</div>
{%- if block.settings.link != blank -%}
</a>
{%- endif -%}
{%- endif -%}
</div>
{%- endcase -%}
{%- endfor -%}
{% schema %}
{
"name": "t:sections.announcement-bar.name",
"max_blocks": 12,
"blocks": [
{
"type": "announcement",
"name": "t:sections.announcement-bar.blocks.announcement.name",
"settings": [
{
"type": "textarea",
"id": "text",
"default": "Welcome to our store",
"label": "t:sections.announcement-bar.blocks.announcement.settings.text.label"
},
{
"type": "select",
"id": "color_scheme",
"options": [
{
"value": "accent-1",
"label": "t:sections.all.colors.accent_1.label"
},
{
"value": "accent-2",
"label": "t:sections.all.colors.accent_2.label"
},
{
"value": "background-1",
"label": "t:sections.all.colors.background_1.label"
},
{
"value": "background-2",
"label": "t:sections.all.colors.background_2.label"
},
{
"value": "inverse",
"label": "t:sections.all.colors.inverse.label"
}
],
"default": "accent-1",
"label": "t:sections.all.colors.label"
},
{
"type": "url",
"id": "link",
"label": "t:sections.announcement-bar.blocks.announcement.settings.link.label"
}
]
}
],
"default": {
"blocks": [
{
"type": "announcement"
}
]
}
}
{% endschema %}
@cureblame - this line - <a href="#" class="darkmode-button" id="dmbutton"></a>
it gets image and since image code is not directly present in file, it must have been fetched from some javascript file, I recommend you to ask to theme developers about this, also check theme settings in customize settings
I don't work with the old theme developers anymore, so I can't contact them. Is there anyway to change it manually?
@cureblame - then need to go through code and check from where the image is been fetched
Which files do you recommend me to check?
@cureblame - javascript files , this will not be easy, but you can check them
This is an accepted solution.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025