Give help. Get help.

  • # June 30, 2009 at 2:45 pm

    As stated in the post’s topic, i was wondering if someone knew how to list sub-pages of a page within the same page. For example, I would like a page named products to list a bunch of products by a certain company, and when more products are added as a sub-page of the products page, the list gets updated to reflect the change. I’m there’s a single wp tag that would do this, so please forgive my stupidity for not knowing this.

    Many thanks in advance for your help.

    # June 30, 2009 at 2:54 pm

    The best place to start is always the codex

    This is what you are looking for

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

      < ?php echo $children; ?>

    < ?php } ?>

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.