Closed responsivewebsg closed 8 years ago
Hi Phil,
Managed to correct the issue with the following code.
<?php
wp_nav_menu( array(
'menu' => 'primary',
'theme_location' => 'primary',
'depth' => 2,
'container' => 'js-bootstrap-offcanvas',
'container_class' => 'collapse navbar-collapse navbar-toggle offcanvas-toggle js-bootstrap-offcanvas',
'container_id' => 'js-bootstrap-offcanvas',
'menu_class' => 'nav navbar-nav navbar-right',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
);
?>
Thanks for the plugin anyways!
@responsivewebsg Glad it is sorted! Sorry I didn't get round to looking into it!
Hi Phil,
No worries on that.
Thank you.
From: Phil Hughes [mailto:notifications@github.com] Sent: Monday, 7 December 2015 5:07 PM To: iamphill/Bootstrap-Offcanvas Bootstrap-Offcanvas@noreply.github.com Cc: responsivewebsg responsiveweb@Outlook.sg Subject: Re: [Bootstrap-Offcanvas] Converting Offcanvas to Wordpress dynamic nav (#29)
@responsivewebsg https://github.com/responsivewebsg Glad it is sorted! Sorry I didn't get round to looking into it!
— Reply to this email directly or view it on GitHub https://github.com/iamphill/Bootstrap-Offcanvas/issues/29#issuecomment-162454266 . https://github.com/notifications/beacon/APX93xAY0ssNdLw4rdmEGBQM0qm0tzPEks5pNUO8gaJpZM4Gvnpg.gif
Hi, I am trying to convert my working index.html , bootstrap and offcanvas css and js. It is working fine on html but when I convert into the header.php on Wordpress using wp_bootstrap_navwalker.php. The offcanvas slides but does not show when collapes but does before collapsing though. I do not have a demo site at the moment but before are the files. Thanks in advance for the time:)
Below are the codes I've used.
Index.html
Header.php
\ After adding the menu dynamically in WP, it shows for desktop site.