Sub Child Pages – Jump Menus
-
Hi guys.. i’m wondering if anyone could point me in the right direction.
I’m trying to create a menu system as such..
<menu>
<parent>Parent Page</parent>
<title>Subpage</title>
<jump_menu>Subpage children</jump_menu><title>Subpage</title>
<jump_menu>Subpage children</jump_menu><title>Subpage</title>
<jump_menu>Subpage children</jump_menu>
</menu>While I can get the subpages to display with their children using this lovely peice of code..
<form action="<?php bloginfo('url'); ?>/" method="get"> <?php if($post->post_parent) $select = wp_dropdown_pages("sort_column=menu_order&selected=".$post->ID."&title_li=&child_of=".$post->post_parent."&echo=0"); else $select = wp_dropdown_pages("title_li=&child_of=".$post->ID."&echo=0"); $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select); echo $select; ?> </form>
I can’t seem to seperate out the child pages of the subpages..
I thought about creating two arrays but these seems overly complicated..
Anyone else done something similar on a theme or project that could point me in the correct direction.
- The topic ‘Sub Child Pages – Jump Menus’ is closed to new replies.