Introduces the [list-pages], [sibling-pages] and [child-pages] shortcodes for easily displaying a list of pages within a post or page.
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:
<?php
function my_list_pages_shortcode_excerpt( $excerpt, $page, $depth, $args ) {
return $excerpt . '...';
}
add_filter( 'list_pages_shortcode_excerpt', 'my_list_pages_shortcode_excerpt', 10, 4 );
?>
You can then include the excerpt via your shortcode.
[list-pages excerpt="1"]
Requires: 2.5 or higher
Compatible up to: 3.4.2
Last Updated: 2012-9-24
Downloads: 24,036
0 of 3 support threads in the last two months have been resolved.
Got something to say? Need help?