Shopify themes, liquid, logos, and UX
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?
Solved! Go to the solution
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
Yes possible.
Please share your website address.
My website is not active yet. Is there any information I can give you?
You can share the preview link.
It will be easy for me to provide you exact code.
Does this work: https://tetomo-store.myshopify.com/pages/newsletter
?
It is the bottom module in the footer that I want hidden.
Thank-you.
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
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.
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.
Thank-you. I am a little new to this. Could you help me locate my product handle?
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
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 %}
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).
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
Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024