There are well known custom queries pre-Wp-2.5 which serve this purpose –namely, to display the child pages of the current page. And there have been many great navigational plugins for breadcrumbs and folding pages/categories/archives.
That said, after discovering that many of the tried and true plugins and custom queries for pre-WP-2.5 just didn’t work anymore (there were many changes to the WordPress database in the 2.5 generation), I went searching for a WYSIWYG solution that anyone could use for displaying child pages of the current page.
I found this wonderful Folding Pages Widget. What it does is display all top-level pages. Then, when on a parent page (those that have sub-pages) it shows a list of indented sub-pages.
This plugin is unique/great in that it doesn’t show children/subpages for all pages –it only expands the sub-pages of the page currently being viewed. With a little addition to the CSS of your theme you can easily emphasize the current page and its children –>
For example, with the following code, if the current page is a parent page its title will be made larger, bolded and followed by right-pointing arrows, to indicated that sub-pages follow. Then the children pages are bolded. If viewing child pages, all sister/brother pages are bolded and expanded to show which level of the page hierarchy is being viewed.
ul li.current_page_item a { font-size:1.1em; font-weight:bold;}
ul li.current_page_item a:after { content:” >>”;}
ul li ul li.page_item a { font-size:1.1em; font-weight:bold;}
ul li ul li.page_item a:after { content:” “;}
The code above will work in the default theme. For your theme you may need to prefix each line with the div of your sidebar. And some themes may have more nested list (ul li) layers. If you’re unsure of how many list layers your theme has, you can view the source code of your site using your browser, or better yet, if you use Firefox, you can install this great FF add-on and hit F12 to quickly see the code in question. –you and also right-click on the list area and select ‘investigate element’ and the Firebug add-on will expand that portion of code. If in doubt and the code above is not working , experiment with adding an additional ‘ul li’ after the first ‘ul li’ above.
Thanks to Chris @ Navy Road for an excellent and efficient WordPress Folding Page Widget.










