• I need to create 3/4 level split menu.
    The standard wordpress menus nest all the sub pages menus as a ul items within each li item.

    I would like the sub menu to be a separate item in the source and site under the main menu.
    it should basically read in all the sub pages as menu items.

    i also want to create a tertiary menu based on the same principal.

    I found this code on the forum in this post: https://www.ads-software.com/support/topic/creating-sub-page-menu?replies=5

    <!-- Main Menu -->
    <div id="mainmenu">
    	<ul>
    	<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    	</ul>
    </div><!-- / Mainmenu -->
    
    <?php
      if($post->post_parent)
      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      else
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
    
    <!-- Sub Menu -->
    <div id="submenu">
      <ul>
      <?php echo $children; ?>
      </ul>
      </div> <!-- / Sub Menu -->
    
      <?php } ?>

    But this is only for a secondary menu and I cant get it to work for a 3rd or 4th menu (it nests them again within the li’s)

    Does anyone know how i can get thsi to work?

  • The topic ‘Creating secondary and tertiary su menus separate from main menu and dynamically’ is closed to new replies.