• my source code for menu sidebar is:

    register_sidebar(array(
        'name' => 'Top Menu',
        'id' => 'topmenu-sidebar',
        'description' => 'Appears as the sidebar on the all pages',
        'before_widget' => '<ul class="my_custom_class">',
        'after_widget' => '</ul>',
        'before_title' => '<li>',
        'after_title' => '</li>',
        ));

    when i add the custom-menu widget the menus are not coming horizontally. the output is like this:

    <ul class="my_custom_class">
     <div class="menu-main-container">
       <ul id="menu-main" class="menu">
          <li>....</li>

    but i need the output to be:

    <ul class="my_custom_class">
       <li>....</li>

    for that how can i remove that container div and ul. please note that i didn’t use wp_nav_menu in header. in my function wp_nav_menu fallback is written.

  • The topic ‘how to avoid div container and ul when using wp_page_menu in functions.php’ is closed to new replies.