Exclude a parent page with get_pages()
-
I have the following code:
<?php $pages = get_pages('exclude=10'); ?> <?php foreach ( $pages as $page ) : ?> <?php echo $page->post_title; ?> <?php endforeach; ?>
I would like to exclude page id 10, but I would still like do display its subpages. If I try to include them with the include parameter, they still don’t show up.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Exclude a parent page with get_pages()’ is closed to new replies.