child_of not working in get_pages
-
I’m using 2.7 B1 and trying to list the child pages of the page in the post content area. I have a shortcode plugin working, but can’t narrow down the pages to just the children:
$pages = get_pages('child_of=65'); $count = 0; foreach($pages as $page) { ?> <h2><a href="<?php echo get_page_link($page->ID) ?>"><?php echo $page->post_title ?></a></h2> <?php } }
When I put in a valid Page ID I get no results. When I change it to 0 (all) or leave the child_of parameter out I get all of the pages listed. Any thoughts?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘child_of not working in get_pages’ is closed to new replies.