Plugin Directory

List Pages Shortcode

Introduces the [list-pages], [sibling-pages] and [child-pages] shortcodes for easily displaying a list of pages within a post or page.

Download Version 1.3

Introduces the [list-pages], [sibling-pages] and [child-pages] shortcodes for easily displaying a list of pages within a post or page. Both shortcodes accept all parameters that you can pass to the wp_list_pages() function with the addition of a class parameter.

Usage

List pages sorted by title

[list-pages sort_column="post_title"]

List pages but exclude certain IDs and set the class of the list to "my-page-list"

[list-pages exclude="17,38" class="my-page-list"]

List the current page's children, but only show the top level

[child-pages depth="1"]

List the current page's siblings and their subpages

[sibling-pages depth="2"]

Please Note

The default values are the same as for the wp_list_pages() function except for title_li which defaults to nothing. If a class is not specified, a default class of either "list-pages", "sibling-pages" or "child-pages" is given to the UL tag. In addition, the echo parameter has no effect.

Requires: 2.5 or higher
Compatible up to: 3.1.4
Last Updated: 2011-6-9 Downloads: 10,009

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(17 ratings)

Compatibility

+
=
Not enough data

2 people say it works.
0 people say it's broken.

Log in to vote.

100,1,1
100,1,1
100,2,2
100,3,3
100,3,3
100,1,1
100,1,1
100,1,1 100,1,1
100,2,2
100,2,2 100,3,3 100,1,1
100,1,1
100,1,1
0,1,0 100,2,2
100,1,1
100,7,7
100,2,2
100,2,2