Hot Line:

+1 (917) 730-2010

AI-Powered Web Development, SEO, Shopify & WordPress — Get a Free Consultation Today. Get Started

Tutorials

Remove Header and Footer From Specific Page [Shopify]

  • 22 May, 2024
  • 1 Comments
  • By WebSensePro
Remove Header and Footer From Specific Page [Shopify]

Welcome to Websense Pro, your go-to resource for Shopify web design, development, and WordPress tutorials. In today’s post, we’ll walk you through removing the header and footer from your Shopify store’s homepage, specific product pages, or even all product pages. This is particularly useful when creating landing pages for ad campaigns where you want a streamlined look without distractions.

Add the following CSS code just below *<head>* in theme.liquid file

<style>
.header-wrapper{
    display: none !important;
}

footer.footer{
    display: none !important;
}
</style>
{% if template.name == "index" %}
ADD CSS CODE HERE
{% endif %}
{% if product %}
ADD CSS CODE HERE
{% endif %}
{% if product.handle == "your-product-handle" %}
ADD CSS CODE HERE
{% endif %}
{% if collection.handle == "your-collection-handle" %}
ADD CSS CODE HERE
{% endif %}
{% if template contains "your-template-name" %}
ADD CSS CODE HERE
{% endif %}

or use the following condition:

{% if page.title == "Page Title" %}
ADD CSS CODE HERE
{% endif %}
4.3/5 · 35 votes
Tags:

    Comments

    Background Pattern

    Want to work with us?

    Let’s build your website, grow your traffic, and automate your business with AI.

    Background Pattern