Plugin Directory

Test out the new Plugin Directory and let us know what you think.
!This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Hierarchical Pages Widget

Makes collapsing hierarchical pages/category/taxonomy lists: top level; ancestors, children, and/or siblings of current

Can I change the format of the display?

Only to the extent that the built-in function wp_list_pages() permits. The plugin works by retrieving a full list of pages, selecting only those pages that are desired according to the widget settings, and then passing those as an 'include' list to wp_list_pages.

You can change the way the current page is displayed, by modifying the


entry in your stylesheet. The documentation of wp_list_pages() at http://codex.wordpress.org/Template_Tags/wp_list_pages explains:

All list items (li) generated by wp_list_pages() are marked with
the class page_item. When wp_list_pages() is called while displaying
a Page, the list item for that Page is given the additional class

Similarly, the style current-cat is provided for the current category.

Why are no pages listed?

This can happen if you are viewing a Post, rather than a Page, and you have "Always show top-level pages?" un-checked. (The plugin does not find a path from the home page to your current location, so it has nothing to display.) If your site has a static home page without children, you should check either the top-level option, or the "Show the static home page?" option.

Are there more versatile ways to exclude pages from the list?

If the exclude list parameter is insufficient, you might try the Exclude Pages plugin, which is compatible with this one:


How can I rearrange my posts and pages?

Try the Pagemash plugin which lets you move pages up, down, in, out, and around your hierarchy with the mouse. It automatically changes the pages' parents and menu order.


If it's posts you wish to rearrange, try this:


Can I call the widgets in a shortcode, or from my theme?

Yes. Try this code, for example, in your theme's functions.php:

function my_category_shortcode($attr) {

That will create a shortcode: [categories] which you can invoke with these arguments, which match the parameters in the widget configuration screen:

  • title -- Title to print, if any.
  • show_siblings -- Show siblings to the current category? 0 or 1
  • include -- Include list. Comma-delimited list of category IDs, or blank for all
  • exclude -- Exclude these IDs
  • orderby -- Sort field. Enter one of: name, count, term_group, slug or a custom value. Default: name
  • order -- Sort direction. ASC (default) or DESC
  • child_of -- Optional: Only display Categories below this ID
  • hide_empty -- Hide empty categories?
  • show_count -- Show count of category entries?
  • taxonomy -- Custom taxonomy. Enter one of: category, post_tag, nav_menu, link_category, post_format. Omit for post categories.

Likewise you could define a shortcode which calls HierPageWidget::hierpages_list_pages to list pages, with parameters similarly taken from the definition of that function.

Your functions.php file or any part of your theme could also call either of those two list functions directly.

Requires: 2.8 or higher
Compatible up to: 3.8.17
Last Updated: 3 years ago
Active Installs: 4,000+


4.1 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1
100,1,1 100,1,1
100,2,2 67,3,2 67,3,2