If all you want is to go to a specific section of the home page, then the easiest way is to use the relative URL mark /
and then use the anchor #xxx
.
So the custom link for the menu will be: /#xxx
.
Note the difference between
#xxx
and/#xxx
as custom link.
The best thing about this approach is that you’ll not have to bother changing the link after you go live, and additionally, this needs no programming.