In my sidebar.php, I want to create filter checkbox on the sidebar as depicted in the above image. So my filter checkboxes would like in this hierachical format:
Animals
- Bears
- Gibbons
- Rhinos
- Orangutan
Campaigns
- Free the Bears
- The Orangutan Project
- The Silvery Gibbon Projet
I looked up the codex, and found a couple of useful properties on the array object get_categories.
However, I'm struggling to come up with my own data structure algorithm to produce the above results so my knowledge in data structure algorithm is fairly weak and I haven't practiced much, especially in PHP. I'm just wondering is there anybody in the community who's done similar functionality as I'm trying to do right now and be able to show me how it's to be done?
Look forward to your feedback.
Thanks.