Jump to content

Remove some navigator menu items from different HOME pages

Go to solution Solved by justinjamesclack,

Recommended Posts

Hey all!

If I have a one page web with only #links and I would like to hide some navigation menu items from one page HOME and some from page HOME-ICE (different languages). What is the best way to do this? 

Screenshot 2024-04-05 at 15.18.17.jpg

Edited by hilmartor
Image
Link to comment
  • Replies 4
  • Views 584
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

28 minutes ago, hilmartor said:

Hey all!

If I have a one page web with only #links and I would like to hide some navigation menu items from one page HOME and some from page HOME-ICE (different languages). What is the best way to do this? 

Screenshot 2024-04-05 at 15.18.17.jpg

Hi @hilmartor,

Which navlinks are you trying to hide? Or are you trying to hide all navigation links on different pages?

Link to comment
Posted (edited)

I have one in English and one on Icelandic which I duplicated. The English one should only show the English links and vice versa. 

So EN should show the English links and ICE should show the Icelandic links. 🙂

Screenshot 2024-04-05 at 15.49.47.jpg

Edited by hilmartor
Image
Link to comment
  • Solution
1 minute ago, hilmartor said:

I have one in English and one on Icelandic which I duplicated. The English one should only show the English links and vice versa. 

So EN should show the English links and ICE should show the Icelandic links. 🙂

Screenshot 2024-04-05 at 15.49.47.jpg

So this is very doable and I have done this in a website I've designed for an artist, that wanted 2 websites in one with different links displayed on different parts of the website. 

So the first thing you're going to want to do is change your url name for each page/link. 

You want to change it so that it's something like /en/url-tag or /ice/url-tag so for example;

www.youraddresshere.com/en/about-us        for the English side of the site and then
www.youraddresshere.com/ice/um-okkur     for the Icelandic side of the site. 

Step 2 is going to each page and accessing the page setting > advanced > header code injection. Then you are going to take the following code and place it on all the English pages/links;

<style>
header#header [href*="/ice/"] {
    display: none;
}
</style> 

and then on every Icelandic page/link go to page setting > advanced > header code injection. Then you are going to take the following code and place it on all the Icelandic pages/links;

<style>
header#header [href*="/en/"] {
    display: none;
}
</style> 

If this doesn't work, then you will have to use the code in a code block, and use the /ice/ code on each English page, and the /en/ code on every Icelandic page.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.