Support » Fixing WordPress » How do I add a created menu to the header?
4 years, 4 months ago
I would like to add a menu structure that I have created myself to the header as menu tabs.
How do I call this in PHP so that it displays my menu?
Thanks in advance!
Hi, I’ve been searching around and have found some code, which works to a degree…
This is what I am using
<?php wp_nav_menu( array('depth=0&menu' => 'SubMenu' )); ?>
My menu is called SubMenu and it does display BUT as soon as it gets to a point where there are subpages, it stops displaying. It will not display the next page if it contains any sub-pages.
I have tried altering the depth but it still doesnt work.
If I move pages that have no child pages further up the menu order then it does display them, but stops displaying as soon as it reaches another page i nthe menu which does have child pages.
Any idea what I am doing wrong?
Sounds like that may be a CSS problem, but without seeing the problem live, hard to say. You could try validating the HTML and CSS and try using Firebug to see what’s going on with the CSS.