WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Nested pages do not appear under parent page (6 posts)

  1. smillerlong
    Member
    Posted 5 years ago #

    I've searched this forum and google, and I've tried everything I could find, but I still can't get the nested pages to appear under the parent. I've set up a parent page called Stories containing a short intro and two nested pages under that parent. When I click on Stories, nothing is there except the short intro. I'm using version 2.6.2 Please help!

    Sandy

  2. MichaelH
    Member
    Posted 5 years ago #

  3. smillerlong
    Member
    Posted 5 years ago #

    Yes! Found this is the link you provided and it works perfectly.

    Thank you!

    <h2>

    <?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?> Pages

    </h2>

    <?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 } ?>

  4. MichaelH
    Member
    Posted 5 years ago #

    Yep, that was right here in the forum:
    http://wordpress.org/support/topic/184483

    Thanks for marking this Resolved!

  5. hypnotiza
    Member
    Posted 5 years ago #

    Quick question about this: I got it to work, however I noticed that on pages that don't have nested pages it still displays a title for Sub-pages.
    http://wphypnotiza.hypnotiza.com/about/ I might not have it pasted into the right part of the template.

  6. hypnotiza
    Member
    Posted 5 years ago #

    I think one way around my above issue is to use a custom page template(s).

Topic Closed

This topic has been closed to new replies.

About this Topic