List Pages at Depth
Plugin version: 1.1
Requires WordPress version: 2.8+
Tested up to WordPress version: 3.1.3
Download: Click here to download...
Description
This plugin creates a more powerful version of the wp_list_pages() function which allows you to specify a start depth.
This means you can easily display secondary and tertiary navigation seperately from the primary navigation on your site.
The list_pages_at_depth function accepts all the same arguments as wp_list_pages, but has an additional argument called ‘startdepth’. Set this to be 0 to display primary navigation, 1 for secondary navigation etc.
If you want to display secondary navigation with indented tertiary navigation you can use this in conjunction with the depth argument – simply set startdepth to 1 and depth to 2.
<?php list_pages_at_depth(array('startdepth' => 1,'depth' => 1)); ?>
The plugin also features a widget so you can easily implement a page list in your sidebar.
Feedback and Support
Please leave comments with feedback below.
If you require support, it is best to post it in the WordPress.org Forum.


November 28th, 2009 at 8:16 pm
[...] List Pages at Depth [...]
December 8th, 2009 at 1:42 pm
How can i delete the list heading (default “Pages”)?
December 8th, 2009 at 2:25 pm
@Geert,
It accepts the same parameters as wp_list_pages so you should just be able to use:
< ?php list_pages_at_depth(array('startdepth' => 1,'depth' => 1, 'title_li' => '')); ?>December 9th, 2009 at 8:58 am
Superrrr! Thanks it’s works!
Regards,
Geert van der Heide
April 4th, 2010 at 3:50 am
Thank you so much for this!
April 4th, 2010 at 5:23 am
One problem, this doesn’t seem to be working on the archive or category pages. Am I doing something wrong?
April 6th, 2010 at 5:53 pm
How can I call subpages from another parent?
April 9th, 2010 at 2:12 pm
hi thanx for this plugin, but it just works with the first navigation-level like:
0,’depth’ => 1)); ?>
the second level:
1,’depth’ => 1)); ?>
this doesn’t work and i can’t figure out why!?!
i work with wordpress 2.9.2. any idea?
April 11th, 2010 at 11:14 am
Drew, you can’t see sub pages on category and archives pages because they don’t have subpages. I guess it would be a nice feature to add so that it can be used to show sub categories on category or archive pages?
You can’t currently call subpages from another parent but I plan to add that at some point.
April 16th, 2010 at 12:42 pm
Thank you very much for this Plug In. After hours of trying i found your Plugin and i implemented it straight into my theme – works just fine!
Many Thanks.
July 2nd, 2010 at 8:46 pm
Thank you for this awesome plug-in! I figured out the answer to my question… should have read through the other posts a little closer.
Thanks again!
September 23rd, 2010 at 7:31 am
Great plugin! Thank you!
To help others, here’s the working code for how I was able to change the title to what I wanted (and to have it display inside a Header3 tag):
1,’depth’ => 2, ‘title_li’ => ” . __(‘Replace This Text with Any Header You Like to Display:’) . ” )); ?>
The above works.
However I have found that an additional unclosed tag is somehow appearing in front of my Header3 in the code. I couldn’t figure out where it is generated from yet. But it makes my Header line display as a list itself also, which I’d like to remove. Any ideas?
September 23rd, 2010 at 7:31 am
Sorry some code seemed to get cut off. It should read:
1,’depth’ => 2, ‘title_li’ => ” . __(‘Also in this Section:’) . ” )); ?>
October 7th, 2010 at 8:22 am
Thank you for the information but I guess there is something wrong that I am doing….
the second level:
1,’depth’ => 1)); ?>
not working for me also….
April 25th, 2011 at 8:10 am
Works like a charm—THANK YOU!
April 25th, 2011 at 8:11 am
p.s. – I’m using wordpress 3.1.1, and it seems to function perfectly.
July 1st, 2011 at 11:38 am
Fab plugin – I can’t find a single other sub menu plugin that allows you to choose the level at which the menu starts – plenty allow you to choose the level it stops at. Great for building dynamic contextual menus in a CMS layout (e.g level 1 in main menu, level 2 in sidebar).
Very simple to use too.
If you ever get the chance please update it to go with the latest version of WordPress (though as noted above it appears to work fine with 3.1.4)
July 5th, 2011 at 9:28 am
Works fine in 3.2 too it seems :)
January 20th, 2012 at 12:22 pm
Dude, I’ve been pulling my hair out trying to code this functionality myself. Life saver! Keep up the good work.