WordPress.org

Ready to get started?Download WordPress

Plugin Directory

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

current_page_item

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
current_page_item. 

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:

http://wordpress.org/extend/plugins/exclude-pages

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.

http://wordpress.org/extend/plugins/pagemash/

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

http://wordpress.org/extend/plugins/postmash/

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) {
   HierCatWidget::hiercat_list_cats($attr);
}
add_shortcode('categories','my_category_shortcode');

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.3
Last Updated: 2013-12-12
Downloads: 31,974

Ratings

4 stars
4.7 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

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

100,1,1 100,1,1
100,2,2
100,1,1 100,1,1
100,1,1
50,2,1
100,1,1
100,2,2 67,3,2 67,3,2
0,1,0
100,1,1
50,2,1
100,1,1
0,1,0
100,2,2
100,2,2
100,1,1
100,1,1
75,4,3