Nav Menu, Remove Container (34 posts)

  1. chreo at wp
    Posted 4 years ago #

    In TwentyEleven, there is the option that any new page be automatically listed in your menu. If it's possible there, it's possible in your theme, you just have to find out where they put the code for it.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    there is the option that any new page be automatically listed in your menu

    That's actually defined under Appearance -> Menus when you are using a custom menu. At present (and to the best of my knowledge), theme devs can't control this via their theme. wp_page_menu() however, will list all Pages by default.

  3. LSCare
    Posted 4 years ago #

    It's alright... I am losing my mind over this so I'm going to come back to it another day I also just locked myself out with a fatal error which will not allow me into wp-admin and I don't have access to an FTP server so can't correct the mistake manually.

    Cheers for the help. I'm sure I will use one of your solutions!

  4. MultiformeIngegno
    Posted 4 years ago #

    Hi guys! :)
    I'm trying to change the class of the <nav> container (or remove it) for a menu, because I have 2 menus in a page and it doesn't validate 'cause I have 2 id="access".

    Here's the code I use to display the 2nd menu:
    <?php wp_nav_menu( array( 'menu' => 'menu_slug' ) ); ?>

    I tried with:
    <?php wp_nav_menu( array( 'menu' => 'menu_slug', 'theme_location' => 'primary', 'container' => false ) ); ?>

    ...with no results.. :(

    WP latest version and twentyeleven child theme

Topic Closed

This topic has been closed to new replies.

About this Topic