Greetings. I am havin a blackout and cannot figure out how to anchor the “About our company” section to “About” page in the menu. See https://albilly.wixstudio.io/alan-test-wix-studio. Any advice is appreciated. Thanks.
I don’t think this is possible yet, although, I do know of a workaround using Velo, and it’s pretty straight forward!
This is all the code you’ll need, and you won’t need to change it in any way.
import wixLocationFrontend from 'wix-location-frontend';
$w.onReady(function () {
const anchor = wixLocationFrontend.url.split('#')[1];
anchor && $w('#'+ anchor).scrollTo();
})
In Dev Mode, add this to the masterPage.js
file. (I believe it’s called “Global” in Studio)
Then, you can then share URLs like this -
https://www.example.com/#veloID
To scroll to a specific part of the page, replace #veloID at the end of the URL with the ID of any element on the page.
The ID can be found when DevMode is on, and selecting an element.
So, in this specific case, whenever they need to share a URL to a specific section, they would just add #sectionID to the end of the URL
2 Likes
Brilliant, worked straight away, thank you