I want to develop an entire site using WP rather than just a blog but I’m having problems with sub-pages.
On my main page, I’ve got the list of Pages but as I now have to create sub-pages, I don’t want them displayed on the main page – only on the parent Page relating to them
For example, if I created two Pages, one about dogs and one about cats and then created a sub-page about dog food, I would only want the dog food Page to show up on the dogs Page.
I can do the sub-Page list on individual pages no problems, but I’m having problemds excluding the sub pages from the main menu
I’m currently using this code:
<?php wp_list_pages('exclude=10&title_li='); ?>
but I’m looking at creating 40 or so sub-pages scattered between 10 or so Pages.
Is there a way of saying “exclude all sub pages” without having to go back to the original Page list and insert the sub-page ID each and every time I create one?
To summarise – does anyone know some code that will only display Parent Pages?
- The topic ‘Exclude all sub-pages from main header’ is closed to new replies.