get_pages
-
Is there a way to specify depth in when using get_pages?
when one uses wp_list_pages, you can specify: depth=1I want to show the children of 246, but not 246’s grandchildren.
I assure you, there is a very good reason indeed for me using get_pages and not wp_list_pages.
The function that does the depth action is
function _page_level_outI can’t really get my head around the logic so as to apply to my get_pages.
Help?
This is my code:
`
$kids = get_pages(“child_of=246”);
foreach ($kids as $post) {
$kinder = get_object_vars($post);
$cptitle = $kinder[post_title];
$kinder = $kinder[ID];note: the last line of code gets mangled when I post it. it just echos the info and closes the foreach.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_pages’ is closed to new replies.