1

I am using wp_list_pages to display my navigation that contains only specific top-level pages using the include parameter.

However, I would like to display the child pages of those top-level pages.

I would have thought this would be possible with:

<?php wp_list_pages('title_li&depth=2&include=8,12,16,20,10,14'); ?>

But it doesn't appear to work. If I remove the include parameter then it seems to work fine, but then it pulls in every page on the site.

0

I imagine WordPress mustn't allow that, so I ended up going with exclude instead

<?php wp_list_pages('title_li&depth=2&exclude=4,214,18'); ?>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.