RYO Folding Category List provides a sidebar widget that displays only top level categories
plus parents and children of current categories in category archives and in Posts. If your website
has lots of categories, this can simplify your sidebar real estate considerably by displaying
only categories of current interest.
The widget's user interface lets you set the displayed title. It displays your categories and lets
you designate which categories should be excluded entirely from the list.
I once used a rather complex function called Fold Category List. It took a long path to do the same thing that wp_list_categories() does. And it didn’t upgrade well. Here it’s redone with entirely new logic that makes it fast and clean, plus there’s a powerful widget with lots of customization options.
Requires at least: WordPress 2.8
See all of our WordPress Plugins
Installation
- Download and unzip ryo_folding_category_list.zip. This will unzip to a folder called ryo_folding_category_list.
- Upload the ryo_folding_category_list folder to the /wp-content/plugins/ directory.
- Activate the plugin through the 'Plugins' menu in WordPress
- The user interface is in the Appearance, Widgets section of the Dashboard. Customize the display there.
With WordPress 2.8 or later you can use the plugin "Upload" utility to upload and install the plugin.
Download
RYO Folding Category List ver. 2.0.1
Screenshots
1. This is the display of the widget on the Front Page. Top level categories only are shown, excluding
any that were checked in widget options.
This image reflects our theme, of course. Your website will be styled as defined in your theme.
2. This is the display of the widget when you select the "Do It Yourself" category or any Post in that category. The top level categories are still displayed, plus the children of
"Do It Yourself." Children of other top level categories do not appear.
This image reflects our theme, of course. Your website will be styled as defined in your theme.
3. This is the widget drop down options panel, illustrating how you may choose to exclude listed
categories.
Frequently Asked Questions
Can I have more than one instance of the widget?
Yes, the current widget system allows for this.
This would allow you to have a completely separate block in your sidebar for unrelated categories.
It might require customization of each widget as Categories are added. But one easy way to do this would be:
- Folding Category Widget #1: Exclude Categories D, E, F.
- Folding Category Widget #2: Include only D, E.
- Folding Category Widget #1: Include only F.
This lets you put certain Categories (D, E, and F) in special places on your website. If you add another
category which you want to appear in Widget #2, you'd have to add it to Widget #2 and Exclude it from Widget #1.
When I select a subcategory, will other subcategories on the same level be hidden?
That's up to you. In normal operation, subcategories on the same level (also called "siblings") will
be hidden. This means one has to go to the parent in order to choose a subcategory.
If that's not what you want check the "Include Siblings" checkbox and the other categories with the same parent will also be displayed.
Changelog
2.0.0
- Initial release.
- Complete rewrite to use WP internals available in WP 2.8+. Not compatible before WP 2.8.
- New logic eliminates most database queries; more efficient, less overhead.
- Based on original idea by Rob Schumann (http://www.webspaceworks.com/) but with entirely new logic.
35 Responses to RYO Folding Category List & Widget