Create an easy way to loop categories and their childs

This is something that I’ve been struggling with for a while now and I know others suffer with the same thing. Looping posts or products categories through All Terms or Current Post Terms gives us all listed categories, both parent and child ones, and there’s no easy way to filter them.

I know that you can achieve something like showing only parent categories through custom hooks, but I think this should be something integrated with loopers overall. I’m still struggling to get a “simple” loop to work where I first loop my parents and them, under each parent I loop their child categories, so I can get a navigation menu for a store, for an example.

Another thing that should be possible to do is getting a value from a looped object the same way we can do with arrays and {{dc:looper:field key=""}}. That would be useful to get around the issue above through conditions.

1 Like

Thanks, @RDADALTE! Appreciate the thoughts and feedback here. As you mentioned at this time, any sort of functionality not immediately covered by the tool can be integrated using a custom hook, and that would be my recommendation to explore at this time. I have noted this down for consideration as a feature improvement at a later date. At this time our primary focus in this beta is on stability after such a large UI / feature re-shuffle and once that is out in the wild and locked down, we will have time to circle back and take stock of what our next round of features / improvements are to be. Thank you!

1 Like