Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am designing a landing page to drive ad traffic, and I'd like to remove the navigation bar on this page only.
I created a custom template specifically for this landing page, but when I removed the navigation bar in this template, it disappeared across the entire website. Could anyone please let me know how to resolve this issue?
Website URL: embroidtale.com
WIP LP URL: https://embroidtale.com/pages/lp/dedicated-landing-page-m3vnzlcf
Hey, Give this a go.
Navigate to Online Store > Themes > Edit code. (you may wish to duplicate your theme, so you can test out of production)
Open your layout/theme.liquid file.
Just above the closing </head> tag, add the following code (make sure to replace the handle text with the handle name of your page):
{% if page.handle == 'enter-the-page-handle' %}
<style>
.header__primary-nav { display: none !important; }
</style>
{% endif %}
Let me know if this doesn’t work. If it does, please remember to mark this as the solution.
autoBlogger: Seamlessly scheduled, fully automated, AI-powered, and SEO-optimised blogging with a host of free extras! Start your 14-day free trial today!
Hi @Olllie
Thanks for your reply! I replaced the page handle with "dedicated-landing-page-m3vnzlcf" then added it before <head>, (see below screenshot) but it didn't work. Should we make any further adjustment to the code? BTW, my page-handle looks very weird with the string "m3vnzlcf". Do you have any idea what that is?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, 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, 2024