Listing Current Pages Children
-
I want to do something similar to this thread, listing the current pages’s children.
http://wordpress.org/support/topic.php?id=24230However, 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.
- The topic ‘Listing Current Pages Children’ is closed to new replies.