- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I have a custom walker for my WordPress navigation. I am trying to make a one page wordpress site but I ran into trouble trying to get single pages working so I decided to just go ahead and reload the page to display the single pages. So my custom walker adds characters to the navigation to make it work. So it looks like this
When I click on a permalink, it changes to the standard link
My problem is that when I try to go to another page, the old address does not go away. So instead of getting
I get this
http://mysite.com/?p=post1#!/about
my custom walker
http://pastebin.com/Xn7NRiG7
On a side note. Does anyone know of any tutorials on making a one page wordpress site? I have been finding it to be very difficult.
In terms of creating a WordPress site without page reloading (using `window.location.hash`), check out: https://css-tricks.com/video-screencasts/81-ajaxing-a-wordpress-theme/.
In terms of the hash not being removed when you go to another page, I think you need to reset it back to null in your JavaScript if there is a query string in the URI. For example:
if(window.location.pathname.indexOf(‘?p=’) != -1) {
window.location.hash = null
}