WordPress.org

Ready to get started?Download WordPress

Forums

Keep subpages when your on a subpage (8 posts)

  1. 45Inches
    Member
    Posted 5 years ago #

    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! :)

  2. 45Inches
    Member
    Posted 5 years ago #

    I mean keeper the subpages from "About" when I'm on a subpage who is a child of "About" and so on.

  3. 45Inches
    Member
    Posted 5 years ago #

    Anybody???

  4. 45Inches
    Member
    Posted 5 years ago #

    What if I just want to print out all childs in my sidebar? If I'm on "About" all the childs from "About" will be in my sidebar as links... if I click one of the childs they will still remain because it's a child of "About" etc. :)

  5. 45Inches
    Member
    Posted 5 years ago #

    Anyone? Please!

  6. 45Inches
    Member
    Posted 5 years ago #

    Bump~

  7. 45Inches
    Member
    Posted 5 years ago #

    Hello? Why won't you guys help me?

  8. johnwar
    Member
    Posted 5 years ago #

    Interesting, it could be improve WordPress. Anybody know?

Topic Closed

This topic has been closed to new replies.

About this Topic