How to remove newsletter module in footer from specific pages?

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?

Yes possible.

Please share your website address.

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.

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

Hi, @JosenAndersen
You can try to use this code.
{% if template.name == “index” %}

.section-header, .announcement-bar, .footer { display: none !important; }

{% endif %}
{% if handle contains ‘about-us’ %}

.section-header, .announcement-bar, .footer { display: none !important; }

{% endif %}
{% if handle contains ‘shop’ %}

.section-header, .announcement-bar, .footer { display: none !important; }

{% endif %}

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

You can share the preview link.

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

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

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

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

?

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

Thank-you.

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 tag, add the following code:

{% if handle contains 'your-page-handle' %}
      
    {% 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).

  1. 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

Add this to your theme.liquid file

{% if page.handle contains ‘newsletter’ %}

.footer__group--newsletter { display: none !important; }

{% endif %}

Please let me know if it works.

Thanks

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

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