Hi,
In my childtheme I have added some extre menu locations.
Functions.php:
// Register multiple WordPress menu's, see <em><u>hidden link</u></em>.
function wsis_register_nav_menus() {
register_nav_menus(array(
// 'support_navigation' => 'Support Navigation',
'shop_navigation' => 'Shop Navigation',
'site_navigation' => 'Site Navigation',
// 'social_navigation' => 'Social Navigation',
// 'footer_navigation' => 'Footer Navigation',
)); }
add_action('after_setup_theme', 'wsis_register_nav_menus');
In my header.php:
<?php wp_nav_menu( array( 'theme_location' => 'shop_navigation', 'container' => 'nav' ) ); ?>
The HTML output:
<nav class="menu-shop-navigation-container">
<ul id="menu-shop-navigation" class="menu">
<li's here>
</ul>
</nav>
There however will be a problem when I assign a WordPress menu to the already available menu location provided by the Toolset Bootstrap parent theme. If I assign menu to this location, it changes the HTML of the other menu, because the nav container will dissapear completly. So only the UL and LI's are left....
Can you please help me with this.
Kind regards,
Willem
Hi Willem,
I have tested your codes in my localhost, how do you "assign menu to this location"?
Could you take a screenshot for the menus location setting?
or duplicate same problem in a test site, and fill the below "private details box" with login details.
Hi,
If I assign a menu to the standard menu location provide by parent Toolset Bootstrap theme, then the problems arise. See arrow on image.
Kind regards,
Willem
I can not duplicate same problem in my localhost,
Could you duplicate same problem in a test site, and fill below private details box with the login details, I need a live website to debug this problem, thanks
Hi Luoy, here you go.
So, as described in my first post here, when I assign my 'Header menu' to your menu location provided in Toolset Bootstrap theme, then the surrounding container as specified in my PHP is dissapearing.
On the other hand I discovered that dropdown menu's are NOT WORKING for any of the menu's, but as soon as I assign the 'Header menu' to your menu location then the dropdown menu on all menu's are working.
Strangs things.
Kind regards,
Willem
Thanks for the details, I am trying to login your website, and will feedback if there is any found
Is this problem resolved? I test it in your website, There isn't such a menu location "header menu"
Please check it:
hidden link domain name/wp-admin/nav-menus.php?action=locations
And I test to assign header menu to the location "Koptekst-menu", then it display correctly
Please let me know if you need more assistance for it.
Hi Luo, in Dutch this is called 'Koptekst-menu'. But it's very simple, in your Toolset bootstrap theme you have added one menu location, and that's the one. The others are mine like explained when I opened this ticket.
So, to illustrate it a little bit more.
When I don't assign 'Header Menu' to your theme's menu location (Koptekst-menu or Header Menu in English), then my PHP is doing what I want.
The PHP format I use for all menu's:
<?php wp_nav_menu( array( 'theme_location' => 'shop_navigation', 'container' => 'nav' ) ); ?>
This is working, see IMAGE 1!
But then, if I assige 'Header Menu' to 'Koptekst-menu' or 'Header Menu' (in English), the NAV element will dissapear! No good. See IMAGE 2.
Kind regards,
Willem
Thanks for the details, I am checking in your test site, will feedback if there is any found
Sorry for the delay answer, I forward this problem to our developers, will update if there is any found.
I have been able to duplicate same problem, and put It into our todo list, and our developers will work on it soon, thanks for the patience.
Our todo list is changed, so I have to re-post the problem, I am closing this thread, will update it when there is any news.