Wordpress mobile menu is not persistent

Hi all,
My wordpress mobile menu is not persistent after being tapped.
It opens momentarily then closes again for some reason.

Any help appreciated.

The nav button is wrapped in <a href="http://www.impactwroughtiron.com.au"></a> so everytime it is clicked it is redirecting to http://www.impactwroughtiron.com.au. Remove the anchor tag and everything should be good.

I’ve always used preventDefault()
Might there not be problems with removing the link?

1 Like

Are you referring to the hamburger button? because this is the button I’m tapping which is causing the resulting menu to disappear after a couple of seconds.

The only link tag I can find anywhere near the hamburger button is the following:

<a class="navbar-brand" href="<?php bloginfo( 'url' ) ?>/" title="<?php bloginfo( 'name' ) ?>" rel="homepage"><?php bloginfo( 'name' ) ?></a>

and I’m fairly confident this is attached to the name of the site on the left - which is as it should be.

Pulled from source

 <a href="http://www.impactwroughtiron.com.au">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>

				</a>
1 Like

Thanks Luke and Mittineague, problem sorted now. :smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.