Hide footer on homepage only

Topic summary

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.

Summarized with AI on November 7. AI used: claude-sonnet-4-5-20250929.

Hi,

How do I hide footer on homepage only.. I want the footer displayed on product and other pages just not on the homepage..
store link: https://www.nutravalid.com/

Any help is greatly appreciated.

1 Like

Hi, @technase
Please open online store → theme → customize → edit code → footer.liquid.

{% style %}
.footer {

{% if template.name == ‘index’ %}
display: none;
{% endif %}
}

{%- endstyle -%}

Hi @technase

check this one.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “theme. Liquid” file. Find the tag and paste the code below before the tag.

{% if template.name == 'index' %}

{% endif %}

And Save.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Thank you it worked