Recent Child Pages
Recent Child Pages is a WordPress plugin that allows you to list the recently created child pages (also known as subpages) of a particular parent page. Basically, it is just like any other Recent Comments or Recent Posts plugin – except that this one is for child pages.
Demo
- Check out the right sidebar of this page. You’ll see a list of the recent child pages of that page itself.
Features
- Page hierarchy is ignored
Even if you have nested your child pages into 3 or 4 levels, the plugin treats them all at the same level. This means that all your child pages will be ordered according to their post date without hierarchy, regardless of what level they are at. In the demo above, you’ll notice that three-level page nesting has been employed, but the Recent Articles section ignores the nesting. - Page independent
You can choose the parent page whose child pages will be listed (this is optional though). This means that the template tag does not have to be on the parent page itself. You can even put it on a sidebar if you want to. - Configurable
If you want to, you can choose what parent page to use, whether page dates are shown, whether a Recent Subpages title is shown, and most importantly, whether the plugin should list all recent child pages, or only those one level below it. - Simple installation and no file modifications required
All primary options are handled by passing variables through the template tag. There is no need to modify plugin files (unless you want to)
Installation
- Download Recent Child Pages and extract the zip archive file.
- Upload recent-child-pages.php to your /wp-content/plugins/ directory.
- Activate the plugin in your blog’s Manage Plugins panel.
- Edit your theme templates according to the usage instructions below in your blog’s Theme Editor panel.
Usage
- Edit Templates:
- Standard: In any of your templates (e.g. Main Index, Page Template), use the template tag recent_child_pages() wherever you want the list to appear.
- Custom: Follow the same instructions as for Standard usage, but use a modified template tag following this structure: recent_child_pages ($parent_ID, $show_date, $show_title, $limit, $only_one_level).
- $parent_ID: By default, no ID is set. The plugin will automatically list the recent subpages of the page on which the template tag has been placed. If you would like to override this behaviour, enter a page ID.
- $show_date: By default, the date of each recent subpage is shown. To turn dates off, put 0.
- $show_title: By default, the “Recent Subpages” title is not shown. If you do want to show it, put 1.
- $limit: By default, the 10 most recent child pages are shown. If you want to show more or less, enter the number you want.
- $only_one_level: By default, this is set to 0, i.e. all levels of child pages are considered. If you’d like the plugin to consider only the level of child pages right below the parent page, then set this to 1.
- $excerpt_on: By default, excerpts are turned off. If you’d like to show an excerpt of user configurable length, then set this to 1.
- $excerpt_length: By default, 40-word excerpts are created (if $excerpt_on is set to 1). If you want excerpts to be longer or shorter, enter the number you want.
- $custom_title: By default, the title of the Recent Child Pages block is “Recent Subpages:” (if $show_title is set to 1). Change this as you see fit.
- $pre_item_tag: By default, each item is pre-pended with a <li> tag. Change this as you see fit.
- $post_item_tag: By default, each item is post-pended with a </li> tag. Change this as you see fit.
- $pre_list_tag: By default, the entire list is pre-pended with a <ul> tag. Change this as you see fit.
- $post_list_tag: By default, the entire list is post-pended with a </ul> tag. Change this as you see fit.
- Edit Stylesheet:
- By default, the list of recent child pages comes unstyled. You can style it using your blog’s primary stylesheet though.
- The entire block is wrapped with a “div” of class “recent_child_pages“.
- By default, the list is an unordered list with no class or id – though this can be modified as you see fit.
- By default, each item is a standard list item – though this can be modified as you see fit.
- Dates are wrapped by a “span” of class “rcp_date“.
- Excerpts are wrapped by a “span” of class “rcp_excerpt“.
- By default, the list of recent child pages comes unstyled. You can style it using your blog’s primary stylesheet though.
Download
Changelog
- v0.7: Allowed user-configurable titles, pre and post list tags, as well as pre and post list item tags. Added capability to draw excerpts of user configurable length.
- v0.5: Plugin first released.
To-Do
- Allow user-configurable depth.
- Implement results cache.
Allow user-configurable title.Allow user-configurable pre and post tags for each list item.








10 Comments
August 10th, 2006 at 9:13 am
[...] For now, check out the Recent Child Pages plugin. [...]
August 11th, 2006 at 5:50 am
[...] Recent Child Pages,在一个单独页面上列出一些Page的标题及其子Page的标题,这样看起来可以比较容易的作出类似手册的效果。看起来人们正在试图把WP变成一个CMS。 page [...]
August 14th, 2006 at 7:07 am
Perfect. And it works wonderfully, exactly what I needed. Thanks a lot!
August 14th, 2006 at 8:18 am
I have a request: would it be possible to draw a certain length of content from the database for the given subpages, sort of like an excerpt of that page? I’m trying to use this as part of a portfolio website, and it would really useful if I could have this plugin pull the title AND some of the text from the subpage.
Thanks in advance for anything you can do!
August 14th, 2006 at 8:31 am
It shouldn’t be difficult, but you’ll have to give me a few hours to a day. I want to make sure I get in some other to-dos into it at the same time, e.g. custom pre- and post-, etc.
Writing the Using WordPress as a CMS series is really sapping my available strength.
August 15th, 2006 at 10:37 am
Sorry, I don’t understand the thumbnail part. What thumbnail should it pull? I hope you don’t mean automatically generating one…
August 15th, 2006 at 10:48 am
[...] Recent Child PagesYep, this is some shameless self-promotion here. Basically, the plugin is just like a Recent Comments or Recent Posts plugin – but for child pages (a.k.a. subpages) instead – and could be useful if you want to use WordPress as a CMS via the pages system. You can check out my somewhat production-level demo (it’s the Recent Articles list on the right sidebar) for more details. [...]
August 15th, 2006 at 10:52 am
I guess I just meant if I could include the link to a thumbnail already created in the meta-data, then it could pull that too. Too much to do I think though…
August 18th, 2006 at 8:06 am
[...] To download the latest version, head on to the dedicated index page of the Recent Child Pages plugin. [...]
November 16th, 2007 at 10:31 pm
[...] Visit [...]
Leave a Reply