Warning: Creating default object from empty value in /home/design/public_html/wp-content/plugins/paged-comments/paged-comments.php on line 31
List Subpages Plugin for WordPress · Dagon Design

Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 1.0   Updated Friday, February 20th, 2009 at 7:19pm

List Subpages Plugin for WordPress

This WordPress plugin generates a list of subpages for the page being viewed. You can use this plugin by inserting the trigger text in your page (where you want the list to appear), or by calling the function directly from your template file. One key feature of this plugin is that it can used outside the loop, which means you can display a list of subpages of the current page in your header, sidebar, or anywhere else. There are also several options available. You can change the sort method, exclude pages, adjust the page depth, show the date, and more.


  If you have found this page useful, please consider donating. Thanks!


  • Download the above file
  • Rename dd-list-subpages.txt from .txt to .php and upload it to your plugins directory
  • Activate the plugin from the WordPress admin panel
  • Configure the options under the admin panel: Options – DDListSubpages

Change Log

  • 04-06-07 Version 1.0 – First release.


To display the list of subpages on your page, just add the trigger text to your page:

<!-- ddlsp -->

(If you are using the visual editor in WordPress, you may have to temporarily disable it to add in the trigger text)

You can also call the function directly from a template file with the following command:

<?php echo ddlsp_generate(); ?>

If you use this method, it does not have to be in your loop, which means you can display the list of subpages anywhere you like in your theme.

Whichever method you use, just remember that it only generates the list when viewing an actual WordPress page which has subpages.


Here are the options available for this plugin under the WordPress admin panel. The options page also includes a ‘load defaults’ button.

Before List

This text is added before the list of pages.

After List

This text is added after the list of pages.

Sort Column

You can choose to sort the list by page title, menu order, page date, page modified date, page ID, page author, or page name (slug).

Sort Order

This lets you choose between an ascending or descending sort.

Excluded Items

This is a comma-separated list of page IDs you want to exclude from the list.

Included Items

This is a comma-separated list of page IDs you want to include. If you use this feature, only pages manually specified will be listed.

Page Depth

This is the depth of subpages that will be shown. The default is 1, and 0 means no limit.

Show Date

If enabled, the date will be shown after each page.

Date Format

If showing the date, this is the PHP date format that will be used.

List Title

This is an optional header for the list of pages.

Pages: [15] 14 13 12 11 10 9 8 7 6 51 » Show All

  1. Awesome information i used this info on http://powrtran.com/

  2. Awesome information i used this info on

  3. Awesome!

  4. Oh, awesome brow. :D

  5. wkwkwkwwk nice

  6. gak penting komen nya, yuk ah kunjungi website ane di

    Mesin Bakso

  7. This is a really handy plugin! :)

  8. Saya suka sekali komen di sini. :D

  9. List Subpages Plugin for WordPress is Awesome. :)

  10. Awesome site you have here but I was curious if you knew of any
    user discussion forums that cover the same topics discussed in this article?
    I’d really like to be a part of community where I can get feed-back from other experienced individuals that share the same interest.
    If you have any recommendations, please let me
    know. Bless you!

  11. Michael Kors Totes are perfectly sized to carry all your daily essentials. Michael Kors Outlet offers the excellent quality and eye-catching design. You can carry these new style totes wherever you go.

Pages: [15] 14 13 12 11 10 9 8 7 6 51 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.

Be sure to wrap all code in <code></code> tags.