This plugin lets you turn WordPress into a proper easily navigable CMS. Having a site made up mostly of pages in the form of a tree (an information site for example) was always a pain until I wrote this to help me out. I have had lots of feedback about it over the last few months and more and more people are finding ways they can use it to improve the navigation and usability of their sites
I wanted to show some sort of hierarchy 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.
Usage
Adding the hook [ sb_child_list ] 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, [ sb_parent ], 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
Category Listings
You can also use this shortcode: [ sb_cat_list category=CatName ] which does what it says on the tin, simply give it a category name and it will show the posts in that category for you with optional ‘limit’ argument
The plugin creates a widget for use also. This works if there is a sub page present. Much like a sub pages widget or similar.
I have added a shortcode for sibling navigation. You can use [ sb_sibling_next ] and [ sb_sibling_prev ] to show links to next and previous pages ordered by menu order followed by post title order. Handy indeed!
Templating
There is a simple templating sytstem to allow multiple templates for [ sb_child_list ] and [ sb_cat_list ] with the argument ‘template’ ([ sb_child_list template="2" ]). Also added excerpt support and support for the SB Uploader Plugin custom fields (custom field called post_image will show if necessary).
Shortcodes
[ sb_child_list ] <-- Arguments allowed are: 'template', 'nest_level' and 'order'
[ sb_parent ] [ sb_grandparent ] [ sb_cat_list ] [ sb_sibling_next ] [ sb_sibling_prev ]
Example Site
I wrote this plugin so that I could display articles in a hierarchy on my boat site (Still in development). See examples of how I am using it at http://www.letsboat.co.uk/ on the articles page. I have updated the CSS to fit it in with the rest of the site.
Screenshots
- Example shortcode hook usage
- Example Page Tree
- What it all looks like (Default)
Download
Latest version is in the WordPress Plugin Directory here: http://wordpress.org/extend/plugins/sb-child-list/
Download an old archive version here (V1.0): SB Child List (3.05 kB)
Note
Shortcodes in this post have had spaces added before and after so they show and aren’t turned into lists of posts by WordPress. A consequence of using the same plugin on the site you are advertising







Hi Sean
How can I add a class to the li?
I want to style the li, not just the link.
cheers
I will add this functionality to the next version.
thanks
Sean
HI love the plugin thanks,
Is there away of highlighting in the child list widget the parent article to separate it from the children?
Thanks,
Hey Richard, you can use [sb_parent] I think but not sure if I have written a way to allow you to identify the parent page in the normal list. Thanks for the feedback thought. Will look to change that for you for the next version.
ta
S