responsive-nav.js icon indicating copy to clipboard operation
responsive-nav.js copied to clipboard

Any fixes for WordPress

Open Speceus opened this issue 9 years ago • 4 comments

WordPress adds a div around the list items and I think that confuses the js.

Any way to make this work?

Speceus avatar Jan 22 '16 11:01 Speceus

I use Responsive Nav in several WordPress Themes but haven't noticed any problems. Can you link to your site or describe to problems you have.

samikeijonen avatar Jan 22 '16 11:01 samikeijonen

Well everything is the same as on our non-wp site, except the html have the wp menu instead of just a ul.

What else should I change from a standard site to a wp site? The js loads just fine and seems to be working, it's just not showing the .nav-collapse and we suspect it's because of the div wp puts around the ul...

Speceus avatar Jan 22 '16 12:01 Speceus

You should remove the div container that WordPress creates by setting container to false.

<?php wp_nav_menu( array( 'container' => false ) ); ?>

tjylhanmaa avatar Mar 11 '16 11:03 tjylhanmaa

My code is below. When I collapse the menu, I don't get any orange hamburger. I should since I'm using the 'advanced' demo CSS and JS.

<nav class="nav-collapse">
 <?php wp_nav_menu( array( 'menu-1' => 'Primary Menu', 'container' => false ) ); ?>
</nav>

Also, how does this code deal with submenus? It doesn't seem like it will work.

currentcreative avatar Apr 10 '17 22:04 currentcreative