Plugin Author
malihu
(@malihu)
Hello,
Just put #top (e.g. http//:example.com/#top) and the plugin will automatically scroll to top (body tag position).
Alternatively, you could add an id to your body or any element indicating the top position and use that.
Thanks Manos, it works! 😀 I have gave a review, 5 stars, I hope it helps!
Btw, I’m curious my previous method, “example.com/#” putting #, it does load to home, but it didnt animate like /#top. May I know why?
Plugin Author
malihu
(@malihu)
Thanks! 🙂
When you put # in the URL, pages always jump to the top. This happens on any page (go to any website, scroll down, insert # in the URL and hit ENTER to test). The browser tries to jump to an empty/non-existing hash and the default action is to go to the default page position, which is the top (this is a browser behaviour and has nothing to do with the plugin).
So Manos,
in other words, my understanding of # is wrong. by input # as custom menu link, because there is no #id e.g #service etc. it will just jump to top.
However, the #top is built in in all html or wordpress at least? (I’m curious this #top is built in wordpress or html standard)
Thank you so much again!
Plugin Author
malihu
(@malihu)
The browsers will go to top by default if you add #top in the URL. This is a native browser (html) behaviour.
Within plugin’s script, I’ve made #top animate to top automatically (without the need for a <div id=#top />) because browsers do the same thing without a plugin.
This said, #top will also work like any other hash/id (e.g. same as #about or #services etc.), meaning you can have a div with id top and the page will scroll to this div instead of the actual top of the page.
Thanks Manos for the explanation, it’s much clearer!! 🙂
I’m fairly new to wordpress creation websites. Malihu, I was wondering why I am having a similar issue. I have menus set up from a pre-existing theme. In the Row Settings under Section id, I put “services, happypeople, etc.” as the id, I then go back to the menu settings under Appearance and the sticky bar menu is NOT pointing to the sections or rows that I want them to. Any help is much much appreciated.
http://vid.us/stn329
As you can see I am clicking on the buttons and they go NO-WHERE…. What is the deal?
Plugin Author
malihu
(@malihu)
Firstly, in your custom menus I don’t see the “Link Relationship (XFN)” field with the m_PageScroll2id value (see “Quick usage” in https://wordpress.org/plugins/page-scroll-to-id/).
In addition, I don’t know what “Section id” does on the front-end (what markup it creates etc.). I can’t really tell if the issue is because of the sections or the links (or something else) unless I see your page’s output.