List Pages at Depth

List Pages at Depth Install Statistics

11
100%
Today: 11 Yesterday: 0 All-time: 6,704 downloads
List Pages at Depth Icon

Try plugin: List Pages at Depth

We'll create fresh WordPress site with List Pages at Depth installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About List Pages at Depth

A more powerful version of wp_list_pages() which allows you to specify a start depth.

0


0


0


0


0

updated: 5 years ago
since: 14 years ago
author: Ben Huson

Description

A more powerful version of wp_list_pages() 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 wanted 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 includes a widget so you can easily add it to your site.

You can contribute and submit bug issues on the plugin’s GitHub page.