Remove footer only from home page

Solved

Remove footer only from home page

LAC1993
Excursionist
14 0 6

Hello,

My website is l'ateliercommerce.com, code: Lac1234 (no need for email).

I am using the Modular theme. I would like to remove the footer only from the home page, so all other pages will include the footer, but the home page will only display the photo without anything below it.

remove footer .jpg

LAC
Accepted Solution (1)

BSS-TekLabs
Shopify Partner
1973 567 667

This is an accepted solution.

- Here is the solution for you @LAC1993 
- Please follow these steps:

z5686811214059_e66de1953f1db631f9134af5cdb796ad.jpg

- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.

 

{% if template == 'index' %}
<style>
.site-footer {
    display: none !important;
}
</style>
{% endif %}

 

- Here is the result you will achieve:

BSSTekLabs_0-1723644482103.png

 

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency

View solution in original post

Replies 7 (7)

niraj_patel
Shopify Partner
2378 514 511

Hello @LAC1993 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
{% unless template == 'index' %}
<style>
footer.site-footer {
display: none !important;
}
</style>
{% endunless %}


Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

BSSCommerce-HDL
Shopify Partner
2030 709 869

Hi @LAC1993 

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </body> tag:

 <script>
      if (document.URL.endsWith('.com') || document.URL.endsWith('.com/')) {
        const e = document.getElementsByClassName('site-footer')[0];
        e.style.display = 'none';
      }
</script>

 here is result:

BSSCommerceHDL_0-1723644296545.png

Hope this can help you, If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you 😍

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency

Priyanka_
Shopify Partner
83 15 22

Hi @LAC1993 

To resolve this follow the below steps;

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file and find the below code:

 {% section 'footer' %}


4) Relace this code with below code:

{%- unless template.name == 'index' -%}
 {% section 'footer' %}
{%- endunless -%}

5) save the changes.

If I managed to help you then, don't forget to Like it and Mark it as Solution!

Was I helpful? 

Buy me a coffee 



If I managed to help you then, don't forget to Like it and Mark it as Solution!

BSS-TekLabs
Shopify Partner
1973 567 667

This is an accepted solution.

- Here is the solution for you @LAC1993 
- Please follow these steps:

z5686811214059_e66de1953f1db631f9134af5cdb796ad.jpg

- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.

 

{% if template == 'index' %}
<style>
.site-footer {
    display: none !important;
}
</style>
{% endif %}

 

- Here is the result you will achieve:

BSSTekLabs_0-1723644482103.png

 

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)

BSS Commerce - Full-service eCommerce Agency
LAC1993
Excursionist
14 0 6

Great the solution work perfectly.  much appreciated. 

LAC
LAC1993
Excursionist
14 0 6

Worked perfect thanks!

LAC

namphan
Shopify Partner
1082 134 167

Hi @LAC1993,

Please go to Actions > Edit code > Assets > theme.css file and paste this at the bottom of the file:

.template-index .shopify-section-group-footer-group {
    display: none !important;
}
Coffee tips fuels my dedication.
Shopify Development Service
Need help with your store? namphan992@gmail.com