Re: How to remove newsletter module in footer from specific pages?

Solved

How to remove newsletter module in footer from specific pages?

JosenAndersen
Tourist
16 0 0

I have a "sign up for our newsletter" module in the footer, however when I activate it, it activates itself on all pages of my website. I do not want to visible on all pages. Can I hide it from specific pages? 

 

 

Accepted Solution (1)
StoreExp
Shopify Partner
8 2 0

This is an accepted solution.

Add this to your theme.liquid file

{% if page.handle contains 'newsletter' %}

<style> .footer__group--newsletter { display: none !important; } </style>

{% endif %}

 

Please let me know if it works.

 

Thanks

Store Experts, LLC | The Expert Shopify Agency to Empower Your Store

- Was my reply helpful? Click Like to let me know!

- Was your question answered? Mark it as an Accepted Solution

- To learn more visit our Website

View solution in original post

Replies 13 (13)

StoreExp
Shopify Partner
8 2 0

Yes possible.

 

Please share your website address.

Store Experts, LLC | The Expert Shopify Agency to Empower Your Store

- Was my reply helpful? Click Like to let me know!

- Was your question answered? Mark it as an Accepted Solution

- To learn more visit our Website
JosenAndersen
Tourist
16 0 0

My website is not active yet. Is there any information I can give you?

StoreExp
Shopify Partner
8 2 0

You can share the preview link.

 

It will be easy for me to provide you exact code.

Store Experts, LLC | The Expert Shopify Agency to Empower Your Store

- Was my reply helpful? Click Like to let me know!

- Was your question answered? Mark it as an Accepted Solution

- To learn more visit our Website
JosenAndersen
Tourist
16 0 0

Does this work: https://tetomo-store.myshopify.com/pages/newsletter

?

 

It is the bottom module in the footer that I want hidden.

Thank-you.

StoreExp
Shopify Partner
8 2 0

This is an accepted solution.

Add this to your theme.liquid file

{% if page.handle contains 'newsletter' %}

<style> .footer__group--newsletter { display: none !important; } </style>

{% endif %}

 

Please let me know if it works.

 

Thanks

Store Experts, LLC | The Expert Shopify Agency to Empower Your Store

- Was my reply helpful? Click Like to let me know!

- Was your question answered? Mark it as an Accepted Solution

- To learn more visit our Website
JosenAndersen
Tourist
16 0 0

Where in the theme.liquid file should I add it? Or is that irrelevant? 

StoreExp
Shopify Partner
8 2 0

Please goto Theme Editor, and you can find the theme.liquid file.

Store Experts, LLC | The Expert Shopify Agency to Empower Your Store

- Was my reply helpful? Click Like to let me know!

- Was your question answered? Mark it as an Accepted Solution

- To learn more visit our Website

Sajat
Shopify Partner
311 34 45

Hi @JosenAndersen 

Welcome to Shopify Community.

You can check for the product handle and use the unless condition to display/hide the specific module.

You can achieve this using adding following code on your footer.liquid file.

 

{% unless product.handle == 'your product page handle(page URL)' %}
      {% sections 'your news letter section' %}
{% endunless %}

 

This should do the trick.

Thank you.

Sajat

-------------------------------------------------------------------------------------------
If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.

JosenAndersen
Tourist
16 0 0

Thank-you. I am a little new to this. Could you help me locate my product handle? 

Screenshot 2024-08-12 at 11.10.26.png

JosenAndersen
Tourist
16 0 0

The page I do not want it visible on is www.tetomo.com/pages/newsletter

Sajat
Shopify Partner
311 34 45

Hi @JosenAndersen 

I was not able to open the website.

Can you please tell me which theme are you using?

I will pass on the code that needs to be placed, but it depends on the theme.

Thank you.

Sajat

Acme
Shopify Partner
69 8 13

Hi, @JosenAndersen 
You can try to use this code.
{% if template.name == "index" %}
<style> .section-header, .announcement-bar, .footer { display: none !important; } </style>
{% endif %}
{% if handle contains 'about-us' %}
<style> .section-header, .announcement-bar, .footer { display: none !important; } </style>
{% endif %}
{% if handle contains 'shop' %}
<style> .section-header, .announcement-bar, .footer { display: none !important; } </style>
{% endif %}

Sweans
Shopify Partner
420 84 125

Hi @JosenAndersen,

To remove the newsletter module from specific pages in your Shopify store, follow these steps:

 

1. Go to Online Store > Themes.

2. Click on Actions next to your current theme and select Edit code.

3. In the code editor, locate the theme.liquid file. This is typically found under the Layout folder.

4.Scroll to the bottom of the theme.liquid file, and just above the closing </body> tag, add the following code:

 

   {% if handle contains 'your-page-handle' %}
      <style>
        .newsletter {
           display: none;
        }
      </style>
    {% endif %}

 

Replace 'your-page-handle' with the specific page handle(s) where you want to hide the newsletter module. The handle is the part of the URL after your domain name (e.g., for example.com/pages/about-us, the handle is about-us).

 

Sweans_0-1723455340840.png

 

5. Click Save to apply the changes.

 

This code will hide the newsletter module on the specified pages only.


If you need further assistance, feel free to reach out!
I hope this helps! If it does, please like it and mark it as a solution!

Regards,
Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com