Support » Fixing WordPress » Keep subpages when your on a subpage

  • Hey, I’ve builded my navigation with subpages, and lets say I got a link called “About” then I have some subpages/childs to “About” … they’re called “History” and “Team”. If I go to “History” all my subpages disappear! I want to keep the subpages from “About” when I’m on a subpage too. Is that possible? My code looks like this:

    <ul id="navigation">
    <li><a href="index.php">Forside</a></li>
    <?php wp_list_pages('title_li=&depth=1'); ?>
    </ul>
    
    <div id="under_navigation">
    <ul>
    <?php
    $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
    if ($children)
    {
    echo $children;
    }
    ?>
    </ul>
    </div>

    I hope it’s possible and somebody will help me! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Keep subpages when your on a subpage’ is closed to new replies.