Hi, @technase
Please open online store → theme → customize → edit code → footer.liquid.
{% style %}
.footer {
…
{% if template.name == ‘index’ %}
display: none;
{% endif %}
}
…
{%- endstyle -%}
A user needed to hide the footer only on their Shopify store’s homepage while keeping it visible on all other pages (product pages, collections, etc.).
Solutions provided:
Option 1: Edit footer.liquid file by adding conditional code:
{% if template.name == 'index' %}
.footer { display: none; }
{% endif %}
Option 2: Add the same conditional CSS code to theme.liquid file before the </body> tag.
Resolution: The original poster confirmed the solution worked successfully. Both approaches use Shopify’s Liquid templating to target only the homepage template (‘index’) and apply CSS to hide the footer element.
Hi, @technase
Please open online store → theme → customize → edit code → footer.liquid.
{% style %}
.footer {
…
{% if template.name == ‘index’ %}
display: none;
{% endif %}
}
…
{%- endstyle -%}