‘YT Tree Menu’ is a widget plugin that displays a menu of all pages in relation to the current page in a CMS tree style layout. The menu is filtered to only list specific pages including child pages. The blog page and posts are supported and it also has the option to exclude items and sort the menu by different columns.
Most default WordPress classes have been added to the widget, but some level aware classes have been added for further styling. Level numbers start at 1 (top level pages) and increase depending on how far down the tree structure the pages go. Below are some of the IDs and classes that can be used to customise the menu layout:
ul#yttreemenu– This is the main unordered list ID
li.yttml_[LEVEL]– Level class for list items. For example:
a.yttma_[LEVEL]– Level class for page links. For example:
a.yttm_current– Class for current open page
a.yttm_current_[LEVEL]– Level class for current open
page. For example:
a.yttm_path– Class for current path (parent / ancestor) page
a.yttm_path_[LEVEL]– Level class for current path (parent / ancestor) page. For example:
To test the path / current item classes, simply add the following to your CSS stylesheet:
- Upload the directory
/wp-content/plugins/directory or install the plugin directly with the ‘Install’ function in the ‘Plugins’ menu in WordPress
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Add the sidebar widget through the ‘Design’ menu in WordPress
- How can I give you feedback or development ideas?
I would love to hear from anyone using this plugin. If you have found bugs, or have ideas, please let me know! Contact me here: firstname.lastname@example.org
- Future Development
I am looking at adding functions for theme integration – including breadcrumbs.
- Do you accept donations?
Contributors & Developers
“YT Tree Menu” is open source software. The following people have contributed to this plugin.Contributors
- Fixed: Exclude Top-Level Pages option
- Fixed: Incorrect Closing Tags
- Fixed: Validation
- Added support for 404 Page
- Renamed file correctly to yt-tree-menu.php
- Blog as static child page now shows full menu
- Added Search, Tag, Category and Date Support
- Increased Post / Level Limit numbers
- Search/Date/Cat/Tag results limited to post number
- Fixed bug: Search has no results
- Fixed Bug: Order of pages by ID if its the same publish date
- Removed spans – added current item class to tags
- Added class for path item (parent or ancestor of current)
- Added non-level classes for current / path pages
- Style fixes
- Bug Fixes
- Added blog page and recent posts
- Added non-static blog home page
- Added option for menu levels
- Added option for post count
- Style fixes
- Bug Fixes
- Added sort option.
- Bug Fixes.
- First stable version.