WenderHost Subpages Widget
As it turns out, I know of at least one other subpages widget, so I’ve named mine the WenderHost Subpages Widget. For a demo of this widget, simply observe the subpages list at the top of the sidebar on this page.
Description
A widget for displaying a list of subpage links. The list remains consistent regardless of where you are in the hierarchy.
Installation
Download the plugin, unzip it, and upload it to your WordPress plugins folder. After activating the plugin, configure it by going to Presentation > Widgets.
Note: This plugin has been tested on WordPress 2.2 and 2.1.3. For versions prior to 2.2, be sure you have the widgets plugin installed.
Features (Version 1.0.1; June 4, 2007)
- Widget displays only on pages with subpages or on subpages.
- Page list remains consistent regardless of where you are in the hierarchy.
- List title is a link to the main page parent.
Options panel (to see it, click on the thumbnail to the right) featuring subpage sort order control and visual divider options.- Adheres to widget XHTML and CSS formatting standards.
Changelog
- Version 1.0.1
- Updated function names to prevent naming conflicts with other plugins.
- Version 1.0
- May 23, 2007 made available for download.
History
I was in need of a good subpages widget for WordPress, so I coded my own before I searched to see if anyone else had done the same. After searching, I did find this WordPress Subpages widget at Floating Sun; however, when I tried to install this other plugin on WP 2.2, I got a fatal error (others have experienced this error too). Therefore, I have yet to confirm whether or not my plugin mirrors the functionality of the other plugin.

[…] WenderHost Subpages Widget is a widget for displaying a list of subpage links. The list remains consistent regardless of where you are in the hierarchy.[…]
[…] WenderHost Subpages Widget ist ein Widget das Unterseiten anzeigt. Es lässt sich auch ausreichend konfigurieren. (No Ratings Yet) Loading … […]
[…] WenderHost Subpages Widget is a widget for displaying a list of subpage links. The list remains consistent regardless of where you are in the hierarchy. (No Ratings Yet) Loading … […]
Does your widget handle sub-sub-pages?
David, yes, my widget does support “sub subpages”. I’ve added an example sub subpage to this very page. You can see it displayed in the subpages list at the top of the sidebar.
Activated this plugin here:
http://acebauer.com/wp/
I left the regular pages list with indented children in place in the left column for you to see that there are indeed child pages. And I inserted the widget at the bottom of the righthand column. Nothing happens. No code is generated on the child pages. WP version is 2.2.1
BJ (see previous comment) and I had a little conversation off-thread. Turns out that we may have discovered a bug: On the blog he was setting up, the subpages widget didn’t display unless it was the top widget in his sidebar. When I have time, I will check into this.
In addition, in chatting with BJ, I realized I haven’t made explicit one of my underlying assumptions that went into the development of this plugin. Namely, from an aesthetic stand point, this widget was designed to work best with templates featuring a horizontal main menu.
Thanks for your plugin. Is there a way to insert the subpages in the page itself? Thanks in advance
Hi There!
I absolutely think this is one of the best plugins that i’ve used before! However… why won’t the subpages under my “front” page will not show up??
I have located my posts to a static page called Blog with subpages under it but it will not show it. I would really appreciate if you can get back to me and help me out on this!
@belgaumashrama - No, my plugin doesn’t support inserting a list of the subpages within the body of the page. However, you can use the WordPress loop to do that.
@Destiny - My guess is that WordPress doesn’t “see” your blog page as a static page. I would recommend moving those static sub-pages underneath another static page parent.
Me again. Since I’ve already found this plugin SO useful, I’d love to use it again, but there’s a recent post on the WP forum that says it doesn’t work with WP 2.3.X. I just confirmed that. The subpage shows in the Pages menu regardless of whether the plugin is active or not.
Any plans to upgrade this most excellent plugin so it works with the 2.3 branch?
And the link in my prior comment is broken since we put the page live from root, so you might want to fix that. Oh, and about assumptions made. “He” is a “she”.
Thanks!
oops. It appears that the ability to do this is now native in wp 2.3.
http://codex.wordpress.org/Template_Tags/wp_list_pages
Hi, This is a great plugin. Can I restrict it so it only shows one level at a time? e.g., see http://www.thundervalley.org/wp/programs/. I’d like to only show the sub pages of the Programs page, not the sub sub pages–the list is too long with all of the sub sub pages.
Hi,
Great plugin!
@bj
I cannot find it on the URL you mension.
@all
Is their a way to let it work in 2.3.1. also?
Hi there. First thank you very much for your great plugin.
I’d like to to point a simple modification that has to do with the search page. If you make a search in the blog and the first listed entry has subpages you’ll get the subpages visible. I must say that I have a plugin installed to to make searches in the whole blog, pages included, so in the search list may appear pages.
To solve this the only modification is in the line where the plugin decides if echoing subpages or not:
if ($sub_pages “”){
must be substituted by:
if ($sub_pages “” && !is_search()){
The general behaviour is not compromised and the plugin covers more scenarios.
@Jorge - Thanks for the tip. My plan is to try to work some time in this week, where I will implement your change and also do a little house cleaning under the hood.
Re: Post #7 (Michael)
Thanks for pointing that out. I was scratching my head over this.
I can confirm the bug. Not only does it have to be the first widget in a sidebar, it demands the FIRST position in the FIRST sidebar. (first registered sidebar in functions.php)
At least on my sites, it won’t work as the first widget in the 2nd or 3rd sidebar. Tested on WP 2.3.3
Great plugin and I’m using it on my site - but how do you style it so the current page is highlighted without the child subpages being highlighted? I see several people have this problem but noone has a solution - any clues?
Never mind - I fixed it - after 3 hours of wondering how to do this it suddenly became obvious. The site isn’t live yet but in a few weeks.
The answer is:
#sidebar ul li a:hover, #sidebar ul li a:active, #sidebar ul li.current_page_item a {
color: #333;
border-bottom:#333 1px solid;
}
#sidebar ul li ul li.current_page_item ul li a {
color: #963;
border-bottom:none;
}
First style will highlight the current page.
The second style prevents it’s subchildren from having the same style. If more than one level of subchildren are present additional styles would be needed to prevent them from inheriting from the real currently page.