• Is there any way to create a page menu across 3 columns (1 column per depth)?

    What I’m after is something like:

    Parent 1 | Child 1 | Grandchild 1
    Parent 2 | Child 2 | Grandchild 2
    Parent 3 | Child 3 |
    Parent 4 | |

    My objective is to have subsequent columns off when current page has no children.

    I can make it work with 2 levels with the code from wordpress codex, but not the 3 levels 🙁

    here’s an example of this kind of menu:
    http://www.davidchipperfield.co.uk/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter andregois

    (@andregois)

    I have 3 DIVs, 1 per level right now, the code is:

    <div id="menu1" class="menu1">
    	<ul role="navigation">
    	<?php wswwpx_fold_page_list('depth=1&sort_column=menu_order&title_li='); ?>
    	</ul>
    </div>
    
    <div id="menu2" class="menu2">
    	<?php
    	if($post->post_parent)
    	$children = wswwpx_fold_page_list("title_li=&depth=1&sort_column=menu_order&child_of=".$post->post_parent."&echo=0");
    	else
    	$children = wswwpx_fold_page_list("title_li=&depth=1&&sort_column=menu_orderchild_of=".$post->ID."&echo=0");
    	if ($children) { ?>
    	<ul>
    	<?php echo $children; ?>
    	</ul>
    	<?php } ?>
    </div>
    
    <div id="menu3" class="menu3">
    	<?php
    	$children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    	if ($children) { ?>
    	<ul>
    	<?php echo $children; ?>
    	</ul>
    	<?php } ?>
    </div>

    If I just have menu 1 and 2 it works, but can’t make menu3 work (and it also breaks menu 2)

    Thread Starter andregois

    (@andregois)

    anyone?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘3 column navigation’ is closed to new replies.