txfx_wp_subpages() can be used to display subpages in the sidebar. See this plugin's site for details. Author: Mark Jaquith Version: 0.6.2 Author URI: http://txfx.net */ /* Copyright 2005 Mark Jaquith (email: mark.gpl@txfx.net) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ function txfx_wp_subpage_display($text='', $depth=5, $show_parent=false, $show_siblings=false) { if ( !is_page() ) return $text; global $posts, $post; $post = $posts[0]; if ( strpos($text, '#i', $text, $matches); if ( strlen($matches[1]) ) $params = explode(',', $matches[1]); if ( isset($params[0]) ) $depth = $params[0]; if ( isset($params[1]) ) $show_parent = $params[1]; if ( isset($params[2]) ) $show_siblings = $params[2]; } if ( $depth > 0 ) $subpage_text = wp_list_pages('child_of=' . $post->ID . '&depth=' . $depth . '&echo=0&title_li=0'); if ( $show_parent && $post->post_parent ) { $parent = &get_post($post->post_parent); $before = '