The essence of the problem:
I have on the site in the top menu there is a link of the following form “http://example.com/#services”.
If I’m on the main page of the site, then it works fine.
But if I’m on any other page, nothing happens when I click on a link.
I need to make it so that on the main page, when you click on this link, you start scrolling to the anchor, and if I’m on another page of the site, you should go to the main page to the specified anchor.
I found “// Anchorscroll” in scripts.js, but since I’m not a programmer, it’s hard for me to understand what needs to be added (changed).