Proper syntax for including a sub-page in a series of included pages

Suppose you already have a specified set of pages you’re displaying in a menu.  You’ve used the include parameter in your tag, so it looks like this:

<?php wp_list_pages('title_li=&depth=1&include=69,181,95,73'); ?>

You want to add a sub-page to this list of included pages, but when you do that, it doesn’t show.  You might think it’s because you have the “depth=1″ parameter, so you change it to a depth of 2 and the code looks like this:

<?php wp_list_pages('title_li=&depth=2&include=69,181,95,73,204'); ?>

Still the sub-page with id 204 won’t show up.

The reason is that you need to get rid of the depth parameter completely, so it looks like this:

<?php wp_list_pages('title_li=&include=69,181,95,73,204'); ?>

Comments, Corrections, Suggestions?

All trademarks and copyrights appearing on this website are the property of their respective owners. All rights Reserved.

Help Panel

I get an error message when I try to replay a video.
Most videos on this site are URL protected. If you don't watch a video within a minute, the URL expires. So if you want to replay a video, just refresh the page.

Key to Icons

  • Requires Administrator level
  • Video about a plugin
  • Browser issue
  • Video is a tutorial

WordPress Versions

  • Version 2.8
  • Version 2.9
  • Version 3.0
  • Version 3.1
  • Version 3.2
Help