A previous theme I used for this site incorporated For some while this site’s been using the collapsible sidebar lists I described in this post. This method requires manually adding PHP and Javascript to the theme’s code. All a bit clunky really.
I’ve finally completed a plugin which provides the same functionality, but in a far more convenient way. The collapsible lists currently displayed in this site’s sidebar are generated by this plugin.
collapsible-lists.zip21.7KB21st April 2013
Functionality
The plugin attempts to mimic the following standard WordPress widgets providing identical or similar configuration options.
- Archives
- Calendar
- Categories
- Meta
- Recent Comments
- Recent Posts
- Tag Cloud [CTC] *
- Tag Cloud
- * only available if the Configurable Tag Cloud (CTC) plugin is active.
Unlike these widgets the plugin allows each resulting list to be expanded or collapsed in the sidebar by clicking the list’s title.
Installation
Extract all files from the ZIP file, making sure to keep the file/folder structure intact, and then upload it to the /wp-content/plugins/ directory. Go to the admin area of your WordPress install and click on the Plugins menu. Click on Activate for the Collapsible Lists plugin.
Settings
Configuration options which provide global settings that control the appearance of all collapsible lists are accessible from the WordPress Dashboard under Settings > Collapsible Lists or from the Settings option for the Collapsible Lists plugin on the Active Plugins page.
Usage
When the plugin is active, the Collapsible Lists widget is displayed on the Widgets page of the WordPress Dashboard.
A collapsible list is created by dragging the Collapsible Lists widget to the sidebar. Configuration options will vary depending on the type of list selected.
Changes in a collapsible list’s state — whether it has been expanded or collapsed — are controlled by a sessionStorage object to ensure consistency across page loads/re-loads. However, once the relevant browser window tab is closed the sessionStorage object for that particular tab is destroyed and the list’s changed-state — should it have one — is forgotten.
Change Log
1.0.0 | Initial Release | 2013-04-22 |
Wonderful wordpress plugin with collapse sidebar.
Thanks
I was very excited to find this, because it seems so hard to find a collapsible menu for WordPress – I’ve been looking for days!! However having downloaded it, I see it doesn’t work with custom menus. If it did, I’d be ecstatic!