Wordpress display/hide child LI tags on menu with PHP

Although I didn't make this code I still feel it needs to be in the knowledge base area rather than the links section as it needs to be available to search the site for it, anyway I was basicallly finding it quite hard to find a wordpress plugin which allows the LI/UL tags to automatically hide depending on wether their parent element is selected or not, kind of like an accordion effect but without the javascript.

Anyway I came across THIS plugin which is very simple and easy to use.


I use this code to make it apply the hiding unless the parent is selected:



wswwpx_fold_page_list ('sort_column=menu_order&title_li='.
'&exclude=5,134,441,439,435,437,443,563,566,715', TRUE);



I've attached a zip of the file should the actual website ever go down for whatever reason.


Buy me a beer or a book?

amazon PayPal - The safer, easier way to donate online!

Free Downloads