Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
List Pages Shortcode icon

List Pages Shortcode

v1.7.7
by Aaron Harp · 4.9 (14 reviews)

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

6K+ active installs Updated Feb 22, 2023 Tested to 6.1.7
Try Demo Download
Pre-installed Ready in ~10s No card
List Pages Shortcode

About List Pages Shortcode

This plugin allows you to easily display a list of pages within a post or page using shortcodes. You can customize the list by sorting it by title, excluding certain page IDs, adding a class to the list, showing page excerpts, and more. The default values are the same as the wp_list_pages() function, but you can also specify additional arguments.

Changelog

= 1.7.7=

  • Fix sort order validation to allow for multiple sort columns.

1.7.6

  • Security Update: Validate all shortcode attributes and escape output.

1.7.5

  • Security Update: Sanitize HTML attributes before outputting.

1.7.4

  • Fix fatal error: validate_list_type() needs to be public!

1.7.3

  • Use PHP7 constructors.
  • Validate list type and convert <li> tags if not <ul> list type.
  • Checked WordPress 4.4.2 compatibility.

1.7.2

  • Add short code arguments to the shortcode_list_pages_before/after actions.
  • Checked WordPress 4.2 compatibility.

1.7.1

  • When no list type specified don’t wrap in list tags.
  • Update List_Pages_Shortcode_Walker_Page class with changes made to the WordPress Walker_Page class.
  • Checked WordPress 3.9 compatibility.

1.7

  • Add ‘list-pages-shortcode’ class to all lists.

1.6

  • Add default arg values to start_el() Walker method. Props eceleste.
  • Added shortcode_list_pages_before action.
  • Added shortcode_list_pages_after action.
  • Added list_pages_shortcode_item filter.
  • Allow specifying of post_type.

1.5

  • Added support for showing excerpt [list-pages excerpt="1"].
  • Allow filtering of excerpt output using ‘list_pages_shortcode_excerpt’ filter.
  • Added support for outputting as ordered list [list-pages list_type="ol"].
  • Allow HTML in ‘title_li’ attribute.

1.4

  • Added support for ‘post_status’.

1.3

  • Added ‘shortcode_list_pages_attributes’ filter. Useful if you need to tweak any attributes based on context or current post type.
  • Allow ‘child_of’ to be overridden by shortcode parameter.

1.2

  • Added shortcode support for ‘exclude_current_page’ parameter.
  • Added support for extra wp_list_pages() parameters: include, sort_order, meta_key, meta_value and offset.

1.1

  • Added ‘shortcode_list_pages’ filter.
  • Added [sibling-pages] shortcode.

1.0

  • First release.

Try other plugins

Yoast SEO icon

Yoast SEO

4.8 · 10M+ installs

Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO…