WordPress.org

Ready to get started?Download WordPress

Forums

How do I add a created menu to the header? (3 posts)

  1. gavinwatson
    Member
    Posted 1 year ago #

    Hello,

    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!

  2. gavinwatson
    Member
    Posted 1 year ago #

    Hi, I've been searching around and have found some code, which works to a degree...

    This is what I am using

    <div id="navcontainer">
    <ul id="nav">
    <?php wp_nav_menu( array('depth=0&menu' => 'SubMenu' )); ?>
    </ul>
    </div>

    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?

    Thanks in advance!

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic