I need to loop only my parent woocommerce categories, but I don't know how

I think my problem is really simple, but yet I couldn’t find an answer.

I’m building a section in my homepage where the parent categories of my store should be displayed and dynamically updated through a looper to fetch the featured image and name, but when I tried to use “All terms > Product Categories” as my provider, the child categories were looped too.

I’m don’t have any knowledge about wp_query and I kept trying for a full day to find any kind query string or code that could run this looper, but I failed hard.

Is there any query string that I could use to mimic “All terms > Product Categories” behavior, but with a filter to not query the childs?

Hey @RDADALTE,

Thanks for reaching out!

You can check this thread on how you can display the parent categories.

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.