Subpage Shortcode

This is a simple plugin to show a listing of pages via a shortcode.  For example, this is used on my Open Source page to show all my open source projects. Basic usage:

[subpages]

It will take any attribute that wp_list_pages will accept (full list). By default it sets child_of to the current page and title_li to blank. More advanced usage:

[subpages child_of=4 exclude="3,7" depth=1]

The above would show the subpages of the page with an ID of 4, excluding pages 3 and 7 and display them in a flat form.

If for some reason you already have a plugin that uses the [subpages] shortcode, you can always use [galahad-subpages] to avoid conflict.

Download it now:

Galahad Sub-Page Shortcode [880 bytes]
  • Roberto Scano

    Hi there is a bug in your example. For have it work, need to use childof and not child_of.