Here’s the story:
I wanted to show some sort of heirarchy in the pages inside Wordpress. I decided to call one of my pages ‘articles’ and have my articles use it as their parent.
Logically you would expect to see a list of the child pages on the articles page along with a pretty picture and some intro text. This doesn’t seem possible natively with Wordpress so I decided to make it happen.
Adding the hook to any post or page will by default show an unordered list showing the children and links to them. If you prefer to style it yourself then don’t worry because you can do that too using the templating system on the settings page.
There is also add another tag, , that allows you to provide a back to parent link from any child. This enables you (in the articles example) to add a “click here to read more on this subject” link. It is also template based so it can say anything or look however you see fit.
Download it here: SB Child List (3.05 KB)
Example Site
I wrote this plugin so that I could display articles in a heirarchy on my boat site (Still in development). See examples of how I am using it at http://boathook.sean-barton.co.uk on the articles page. I have updated the CSS to fit it in with the rest of the site.
Screenshots




I started a new wordpress site. I liked your plugin and worked great. I had installed and tested it in a sub-directory and now want to implement it by simply redirecting the domain to that subdirectory. Everything works great except this plugin which when it lists the child names, still includes the old directory, which no longer exists. Is there a way to get it to re-calculate the list?
Hi Mike,
The plugin doesn’t store any paths, it simply used the guid field in the wp_posts table. That is updated by WP itself. To sort it often it only takes a single edit to the page itself which should update the path. So visit the edit screen for the page in the admin system and click update page which I think will sort it. It’s a common problem I have heard of as Wordpress for some reason doesn’t often update those fields. There must be a way to force a mass update? Let me know how you get on.
thanks
Sean
I’m having precisely the same problem. Scoured the database manually and cannot determine why sb_child_list is displaying the original installation’s post_permalink value instead of the new one. Absolutely mystifying.
Hi… does resaving the post or page update the permalink? try that and let me know.
thanks
Sean
Hi,
Maybe I got the solution for your problem:
The hook “[post_permalink]” refers to the “guid”-field in the table “wp_posts”. When a page is created the url is written to this field, but it won’t ever be updated – for example if you move the pages to another domain..
My solution was to update the sql-table in phpmyadmin or to insert my own “[post_name]” hook in seans plug-in…
greetings from zurich,
sebastian
Hi Sebastian, I’m not entirely sure the fix is relevant to my plugin although please do elaborate on the need for the post_name hook. I am looking into a way to get the proper permalink to show.
Suggestions welcome.
thanks
Sean