Jump to content

Switch navigation is not working correctly, need manual reload

Recommended Posts

Hi everyone,

I am setting multilingual navigation for my website. www.bizlinks.com.auIf I click the English button on the right corner, the webpage will change to English mode, but the navigation title doesn't change except I manual reload the page.alt text

I'm using the Mojave template, the structure of the website is attached below.alt text

I'm using this code for the primary navigation


<style>nav.Header-nav--secondary {
  display: none;
}
 .Mobile-overlay-nav--secondary {
  display: none;
 }
</style>

And this code for the Secondary Navigation.


<style>nav.Header-nav--primary {
  display: none;
}
 .Mobile-overlay-nav--primary {
  display: none;
 }
</style>


It's that any code to add that can fix this issue? Many thanks.

1564463457892.jpg.f194ac874dcb0622e4990954c97d7436.jpg

1563958584171.jpg.26fc5edcbe57ed411bd859168da49176.jpg

Link to comment
  • Replies 5
  • Views 943
  • Created
  • Last Reply

Try remove your code, and add these code into Home > Design > Custom CSS


/* Home CN */
body#collection-5ce627a6e4966ba4fa4eca90 nav.Header-nav--primary {
   display: flex;
}
body#collection-5ce627a6e4966ba4fa4eca90 nav.Header-nav.Header-nav--secondary {
   display: none;
}
/* Home English */
body#collection-5cec92d5e2c4834cdc180df8 nav.Header-nav.Header-nav--primary {
   display: none;
}
body#collection-5cec92d5e2c4834cdc180df8 nav.Header-nav.Header-nav--secondary {
   display: flex;
}


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thanks tuanphan, the codes work well in home page. But the sub-page keep showing the same problem. Like the service navigation in English Mode.

Is that any code that I can use for the whole page?? Many thanks!!!

Link to comment

@Zephyrlin Each page has its own ID. You can use the above code for each page, they are seperately by commas ... seems a lot of code.

If you use this way. See how to find Page ID. https://beaverhero.com/squarespace-how-to/#HowtoFindPageID

I am thinking about whether there is a simpler way.


 body#collection-5ce627a6e4966ba4fa4eca90 nav.Header-nav--primary, body#collection-13409sdfs09845930845039458 .nave.Header-nav-primary, body#..... {
css
}




Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.