• Resolved sergis

    (@sergiselvas)


    Hi Everyone
    I am trying to use a submenu each time there are children pages. I’m using this:

    <?php $children = wp_list_pages(‘title_li=&child_of=’.$post->ID.’&echo=0&depth=1′); if ($children) { ?>
    <?php echo $children; ?><? } ?>

    Chilndre pages menu is showing well, but when I click a children page on that submenu, it desapear from the submenu.

    Sorry for my english, I’m trying my best, what I need is show the submenu always unless I click on another page

    Thanks everyone for your help!

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

    (@sergiselvas)

    Resolve, more or less. I use this:

    <?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) { ?>
    <?php echo $children; ?>
    <?php } ?>

    But now, if I’m reading a subpage the parent is not showing actived. There is any solution for this?

    Cheers

    Thread Starter sergis

    (@sergiselvas)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Children pages menu’ is closed to new replies.