5,000+
February 21, 2023
March 4, 2009
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.
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"]
Show excerpt (for pages excerpt support will need adding manually or via the Page Excerpt plugin)
[list-pages excerpt="1"]
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"]
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.
In addition to the wp_list_pages() arguments, you can also specify:
<ul>.0.0.Firstly you will need to add support for excerpt for your pages. You can either you this by using the add_post_type_support() function or using a plugin like Page Excerpt.
You can also use the ‘list_pages_shortcode_excerpt’ filter to return or customize the excerpt for specific pages. The following example:
You can then include the excerpt via your shortcode.
[list-pages excerpt=”1″]
= 1.7.7=
<li> tags if not <ul> list type.shortcode_list_pages_before action.shortcode_list_pages_after action.list_pages_shortcode_item filter.post_type.[list-pages excerpt="1"].[list-pages list_type="ol"].| Version | Download | Type |
|---|---|---|
| 1.7.7 | Download | Stable |
| 1.7.6 | Download | Stable |
| 1.7.5 | Download | Stable |
| 1.7.4 | Download | Stable |
| 1.7.3 | Download | Stable |
| 1.7.2 | Download | Stable |
| 1.7.1 | Download | Stable |
| 1.7 | Download | Stable |
| 1.6 | Download | Stable |
| 1.5 | Download | Stable |
| 1.4 | Download | Stable |
| 1.3 | Download | Stable |
| 1.2 | Download | Stable |
| 1.1 | Download | Stable |
| 1.0 | Download | Stable |
| Development | Download | Trunk |