I created several menu. So far they posted fine.
But on the latest page I am working on they failed to load.
http://thebigmeow.us/aboutus/
I have this in the.php (yep two. second will be styled to go from right to left)
<div class="navbar">
<div class="navbar-inner">
<?php wp_nav_menu( array( 'menu' => 'about' ) ); ?>
</div>
<div class="navbar-inner">
<?php wp_nav_menu( array( 'menu' => 'aboutSub' ) ); ?>
</div>
</div>
and this in the function.php
register_nav_menus(
array(
'top_nav' => 'topNav',
'main_nav' => 'mainNav',
'eng_nav' => 'engMenu',
'tech_nav' => 'techMenu',
'staff_nav' => 'staffMenu',
'invest' => 'investMenu',
'about' => 'aboutMenu',
'aboutSub' => 'aboutMenuSub',
'results' => 'resultsMenu'
)
);
They have been appropriately created in the wp-admin area for menus.
so not quite sure what is up w/this.
Suggestions or advice please
Thx
D
and actually when I go & debug w/chrome. it says the mainmenu has loaded???
force
July 8, 2013, 5:24am
3
The function is “register_nav_menu”–singular, not plural. It doesn’t take an array of values. You need to call the function for each individual menu.
http://codex.wordpress.org/Template_Tags/register_nav_menu
so force to make sure I understand you correctly:
replace what i currently have:
register_nav_menus(
array(
'top_nav' => 'topNav',
'main_nav' => 'mainNav',
'eng_nav' => 'engMenu',
'tech_nav' => 'techMenu',
'staff_nav' => 'staffMenu',
'invest' => 'investMenu',
'about' => 'aboutMenu',
'aboutSub' => 'aboutMenuSub',
'results' => 'resultsMenu'
)
);
with:
register_nav_menu(‘top_nav’, ‘topNav’);
register_nav_menu(about’, ‘aboutMenu’);
register_nav_menu(‘tech_nav’, ‘techMenu’);
etc…
is that correct?
Thank you
D
force
July 8, 2013, 11:10pm
7
Hm, that function didn’t come up in my search for some reason. Sorry about that.
You should be able to use it like in your first post, which seems to be correct.
Do you have PHP errors enabled?
heck no problem. Thank you for trying to answer my questions to begin w/.
I had also seen the multiple menus in two video tutorials. But anyway…No. no php errors.
all the tags seem to be correct to me.
force
July 9, 2013, 3:50am
9
Is there any HTML code being generated inside your navbar-inner div tags?
hi. nope.
and what is weird is that it works on my sandbox…
my latest file has
<?php wp_nav_menu( array( 'menu' => 'staffMenu' ) ); ?>
on my sandbox it gives me the items i picked. live it defaults to a diff menu.