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.

Is there a way around this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.