I don’t understand your question very well. Do you want to navigate to the main page? If you want that, you have to create the menu link with the absolute url, for example http://www.yourwebsite.com/#contact
I want the main page menu to have relative links (#contact) But that menu will not work while on /blog. So how do I make the menu change so when you’re on the /blog or /portfolio the menu links are absolute?