I tried using the code here on one of my site pages, but it doesn't work... Is this specific to a certain template? And how do you identify the child number? it looks like the nav links are under separate divs starting with "<div class="header-nav-item header-nav-item--collection">", does this change how this code would work for my site?
On 2/24/2023 at 12:37 AM, creedon said:
Add the following to Page Settings > Advanced > Page Header Code Injection for the page. Please see per-page code injection.
<style>/* hide some elements in header *//* desktop */html:not(.squarespace-damask ).header-nav .header-nav-item:nth-child(3),html:not(.squarespace-damask ).header-nav .header-nav-item:nth-child(4),html:not(.squarespace-damask ).header-actions--right .header-actions-action,/* mobile */html:not(.squarespace-damask ).header-menu [data-folder="root"].header-menu-nav-item:nth-child(3),html:not(.squarespace-damask ).header-menu [data-folder="root"].header-menu-nav-item:nth-child(4),html:not(.squarespace-damask ).header-menu .header-menu-cta
{display: none;}</style>
How to use different site headers on different pages on 7.1?
in Site Design & Styles
Posted
I tried using the code here on one of my site pages, but it doesn't work... Is this specific to a certain template? And how do you identify the child number? it looks like the nav links are under separate divs starting with "<div class="header-nav-item header-nav-item--collection">", does this change how this code would work for my site?