Title: Submenu problem WordPress 2.7
Last modified: August 19, 2016

---

# Submenu problem WordPress 2.7

 *  Resolved [Remon de Vries](https://wordpress.org/support/users/lemodesign/)
 * (@lemodesign)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/submenu-problem-wordpress-27/)
 * I updated to WordPress 2.7 I have a problem with the code below:
 *     ```
       <?php if($post->post_parent) { $parent = get_post($post->post_parent);
       	if ($parent->post_parent) {
       		$children = wp_list_pages("depth=1&amp;sort_column=menu_order&amp;title_li=&amp;child_of=".$parent->post_parent."&amp;echo=0");}
       	else {
       		$children = wp_list_pages("depth=1&amp;sort_column=menu_order&amp;title_li=&amp;child_of=".$post->post_parent."&amp;echo=0"); } }
       	else
       		$children = wp_list_pages("depth=1&amp;sort_column=menu_order&amp;title_li=&amp;child_of=".$post->ID."&amp;echo=0"); if ($children) { ?>
       	<ul>
       		<?php echo $children; ?>
       	</ul>
       <?php } ?>
       ```
   
 * It should only show the submenu of the current page your on. But for some reason
   this is not working anymore in the 2.7 version. I did look around the forum but
   couldn’t find anything useful, I hope someone can help me out because I a pretty
   stuck at this point.

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

 *  [inghelm](https://wordpress.org/support/users/inghelm/)
 * (@inghelm)
 * [17 years ago](https://wordpress.org/support/topic/submenu-problem-wordpress-27/#post-1048025)
 * How did you solve this issue?
    Im trying to find a solution where the current-
   parent page expand it’s child-pages in an absolute normal and ordinary way (should
   be pretty common) but can’t find anything telling me how to?
 *  [nails64](https://wordpress.org/support/users/nails64/)
 * (@nails64)
 * [17 years ago](https://wordpress.org/support/topic/submenu-problem-wordpress-27/#post-1048026)
 * I’m having the same problem. Can’t find the answer anywhere. Just want to link
   my subpages.
 *  [inghelm](https://wordpress.org/support/users/inghelm/)
 * (@inghelm)
 * [17 years ago](https://wordpress.org/support/topic/submenu-problem-wordpress-27/#post-1048027)
 * Got theese and it works! Just have to adjust my css and it’s done! 🙂 widget 
   and none-widget works the same way!

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

The topic ‘Submenu problem WordPress 2.7’ is closed to new replies.

## Tags

 * [parent](https://wordpress.org/support/topic-tag/parent/)
 * [submenu](https://wordpress.org/support/topic-tag/submenu/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [inghelm](https://wordpress.org/support/users/inghelm/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/submenu-problem-wordpress-27/#post-1048027)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
