WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] need to show child links on child page (3 posts)

  1. renzoroberts
    Member
    Posted 8 years ago #

    Here is what I am trying to do.

    I would like to list the child pages of FUN without list all the parent pages.
    I tried
    < ?php wp_list_pages('depth=3' . 'child_of=159'); ? >
    but that shows all of the parents and other child pages.

    I tried
    < ?php wp_list_pages('child_of=159' . 'depth=2'); ? >
    but then nothing is displayed.

    I'm looking for an easy way to display one level of 'fun stuff' links without having to use a bunch of excludes to eliminate the second level.

  2. MichaelH
    Member
    Posted 8 years ago #

    Assuming that the page id for Fun Emails is 159, then using just
    < ?php wp_list_pages('child_of=159');
    should only list pages Adams First, Are You Normal, Dear Bubba etc.

    Just FYI if you are using multiple parameters use the & sign:
    < ?php wp_list_pages('depth=3&child_of=159'); ? >

  3. renzoroberts
    Member
    Posted 8 years ago #

    Thanks for the help.
    I did not know that I need the '&' between multiple parameters.

Topic Closed

This topic has been closed to new replies.

About this Topic