Display condition if top level taxonomy

Hello, I created a custom taxonomy called Departments that has hierarchy enabled for top level and sub departments. For example: Human Resources > Benefits

I have also created custom post type called Team with another custom taxonomy to flag managers and directors and it uses this department taxonomy to put team members in the right department.

I created two loopers on my archive template for departments, one displays the leadership for say all of Human Resources; team members in the current term with manager or director taxonomy term, my second looper is for sub departments and displays the manager with the current term and then non managers with the current term.

Is there a condition I can set to only show that leadership section if it is a top level department with no parent and to otherwise show the more department specific team section.

My loopers are working fine and showing what I want, I am just trying to show and hide them based on if a parent exists. They are laid out differently with different headers so it is not just a matter of using the provider to filter them.

Maybe there is another idea of how I can accomplish the same thing, I am open to suggestions.

Hello @Noaviv,

Thanks for writing in! regretfully we do not have that kind of condition. What you can do is filter out the departments in your Looper Provider Query String. Perhaps this old thread can help you:

If this does not help, please provide us access to your site so we can inspect your layout and your nested looper.

Best Regards.

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