Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Can't Add Ul Class to wp_nav_menu

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #163246
    Steven Morgan
    Participant

    I have had this problem for awhile now.

    Functions.php has theme support for menus.

    In my nav I have:

    wp_nav_menu(array( 
    'theme_location' => 'primary',
     'menu_class' => 'sf-menu', 
    'container' => false 
    )); 
    

    It outputs:

    <div class="sf-menu">
      <ul>
        .......
      </ul>
    </div>
    

    How can I remove that container? Container=False doesn’t seem to do it. I want to make it <ul class="sf-menu">

    #163247
    Steven Morgan
    Participant

    ‘container’ => ”

    Also doesn’t seem to work.

    #163269
    Alen
    Participant

    Try

    'container' => '',
    

    '' – Empty string.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.