treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Wordpress query post; show all child pages?

  • Hi!

    I have a little problem, i want to list all the child pages of a page without having to specify the childs name, is this possible?

    I cant use the wp_list_pages because of alot of reasons and i want to use the loop.

    The query post for displaying a specific child looks like this: query_posts('pagename=who-we-are/child'); but that only displays one single item, i really want to list all the child pages instead!

    Any sollution?
  • *Moved to CMS section

    I don't understand why you can't use wp_list_pages? What are your reasons?
  • Well if he needed actual content wp_list_pages wouldn't work, although he didn't actually say that.

    I was just looking into this today actually and failed. You can query_posts for Pages, but there doesn't seem to be a parameter to specify a parent/child. I bet there is some fancy way to do it though...
  • Maybe make it so all the child pages are in their own directory, then display the contents of that directory?