Forums

[resolved] Submenu problem WordPress 2.7 (4 posts)

  1. lemodesign
    Member
    Posted 3 years ago #

    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.

  2. inghelm
    Member
    Posted 3 years ago #

    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?

  3. nails64
    Member
    Posted 3 years ago #

    I'm having the same problem. Can't find the answer anywhere. Just want to link my subpages.

  4. inghelm
    Member
    Posted 3 years ago #

    Got theese and it works! Just have to adjust my css and it's done! :) widget and none-widget works the same way!

Topic Closed

This topic has been closed to new replies.

About this Topic