• I want to do something similar to this thread, listing the current pages’s children.
    http://wordpress.org/support/topic.php?id=24230

    However, the plugin listed there is far too robust for me. I simply want to do something where the current page’s children are all listed using child_of. I finally got it figured out how to pass in the right child_of argument to wp_list_pages. But then, I got this error.

    Warning: Invalid argument supplied for foreach() in {hidden}/wp-includes/template-functions-post.php on line 367

    When I traced through the code, I discovered that because $cache _pages was set, get_pages() was not actually ever setting $cache_pages() to my new query. $cache_pages was set to ARRAY when I simply echoed it. Can anyone tell me how $cache_pages is set? I thought it might be because I do a wp_list_pages() in my sidebar, but that didn’t seem to explain anything because when I took my sidebar code out as a test, I got the same error.

Viewing 1 replies (of 1 total)
  • @ninthgirl, I think I found the answer to that one yesterday. There’s a bit of code (an if statement) in the template-functions-post.php to be commented out. Let me find the thread that describes it. Okay, here it is.

    In turn, since I’m trying to do a similar thing to what you’re doing, would you describe how you figured out how to pass in the right child_of argument?

Viewing 1 replies (of 1 total)
  • The topic ‘Listing Current Pages Children’ is closed to new replies.