Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
@josh34, I would advise you change your username and password as soon as possible. In future please don’t post sensitive information on these forums. These are public facing forums and anyone could (and might already have) accessed your dashboard within the 8 hours that it was posted.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
It looks like this is the file that controls your navigation functionality: http://testsite01.x10host.com/wp-content/themes/naturebay/js/navigation.js?ver=20151215
Within the first few lines it tells the browser to stop reading the file if a certain element does not exist:
container = document.getElementById( 'site-navigation' );
if ( ! container ) {
return;
}
If you look at the source code of your page, you don’t have an element with the ID of ‘site-navigation’.
I didn’t read the other lines of that file.
Thread Starter
josh34
(@josh34)
How do you suggest I fix it?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Can you tell us more about your setup, which theme are you using?
Thread Starter
josh34
(@josh34)
This is an HTML to wordpress conversion. I used the underscores theme. Everything works fine with the toggle nav menu on the static site. It just acted up after I hooked in the wordpress navigation function in the page-home.php. The menu seems to have been hooked in ok, it’s just the toggle part on mobile and tablet screens. Something must just be referenced wrong somewhere in the wp_nav_menu hook.
Thread Starter
josh34
(@josh34)
The javascript at the bottom of the page-home.php seems to be referenced ok. jquery was recognized. Unless it’s conflicting with something.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Did you have time to explore my initial conclusion that you don’t have the appropriate HTML for the JS to work? Your navigation JavaScript says it in black and white. If you don’t have the appropriate HTML then your JavaScript will not work.
You have 2 options, change the JS or change the HTML.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I will be able to help you if you decide to change the JS, otherwise I’m not familiar with the underscores theme and we don’t support commercial themes so finding support might be more difficult.