History back doesn't work when used Hashes / Anchor / history push state
-
Hi Armin,
I'm building a website with your theme right now. Instead of FullPageJS I intentionally used scrollify JS to jump from section to section. This generates hashes, which I use for navigation reasons.The problem is, when I leave the main page with the sections and navigation logic in order to go to some project, I can't go back in history. I have to disable the hash functionality of the plugin to make history.pushState() work properly. How can I solve this problem? The navigation within the projets works properly.
A minor problem is, that the main page can't be opened smoothly with this code pattern:
eg.: data-id="25" data-title="Studio" data-type="page".
I need a full refresh of the page. Does it have to do with the video background or something? -
Hey Clemens!
Can you post a link to your website that we can have a look?
All the best!
Marius
-
Hello Armin / Marius,
I don't know how this story ended, but I got quiet the same problem with a website I am working on. I am not a developper and I only got some notions in HTML/CSS/JS, so i'll try my best to explain.
I created a fixed button on the top of my homepage, wich leads to an anchor lower down the page. First things, depending from where the link is clicked, it add /#nameofmyanchor or only #nameofmyanchor. I don't get why does it leads to 2 differents URL
Then when I go to some other page on the site and I come back to the home page with the browser previous buttons, it leads to the same page i'm on with #nameofmyanchor at the end of url (forexemple works/#nameofmyanchor instead of home/#nameofmyanchor).
I have to click a second time on the browser previous button to go on the right page.Is there a solution to this issue ?
Thanks a lot for your attention :),
Théo -
Hi @Théo-Viardin !
Can you post a link?
Keep in mind that LayTheme is coded as a single javascript application.
That means the back button in the browser really goes back in history. And the last thing in history is the anchor.Let me know when you have uploaded the page.
Best!
Marius
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it