Skip Navigation

[Resolved] Create A Category Tree With Nested Sub Cats

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 11 replies, has 2 voices.

Last updated by Ed 2 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2464465

Ed

So, I followed Agnes' tutorial (https://toolset.com/2021/11/how-to-build-a-custom-category-tree-with-toolset/).

I've tried (almost) everything, but I still only get a jumbled, unordered list of categories (Organizations).

The taxonomy is broken down like this (and should be displayed the same way):

MLB (1)
AL (1)
East (1)
New York Yankees (1)

#2464797

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I will have to check what mistake you have done while creating the parent and child view.

Could you please share problem URL and admin access details and let me review your current setup and get back to you with the possible solution.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2464953

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing admin access details but could you please share the problem URL where you added the views and tell me what is your expected output.

#2464963

Ed

hidden link

The expected output is illustrated on the page I linked to originally (https://toolset.com/2021/11/how-to-build-a-custom-category-tree-with-toolset/).

The only difference being that I have Cats (Majors), Sub-Cats (Leagues), Sub-Sub-Cats (Divisions), and Sub-Sub-Sub-Cats (Teams).

NFL
-NFC
--East
---Dallas Cowboys

#2464985

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now: hidden link

I just uncheck the checkbox "Don't show empty terms" from "Query Options" of your view.

This is how nested view will work. I see you have almost 3-5 nested views.

#2465047

Ed

Minesh,
I think you're on the right track, but, as you can see yourself, this is not an acceptable output.

#2465067

Ed

Something really seems to be wrong. If I change the "Order By" on each view to "Ascending", it completely changes the structure of the displayed list(s).

If it helps, the ultimate goal is to have each term listed only one time on that page. No term should be listed twice. I was also hoping to be able to have each item be a member of the parent terms (major, league, division), instead of just the team.

Example:
"Dallas Cowboys Game-Worn Helmet"
Belongs to NFL (major)
Belongs to NFC (league/conference)
Belongs to NFC East (division)
Belongs to Dallas Cowboys (team)

As it stands, the item would only belong to "Dallas Cowboys."

#2465101

Ed

Awesome! Whatever you did worked like a charm. This is EXACTLY what I was hoping for.

Please explain what was wrong/how you fixed it.

#2465141

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Glad to know that its working for you as expected. As shared before I just unchecked the checkbox "Don't show empty terms".

#2465151

Ed

Minesh,
Thank you for you time in this matter.

I still don't understand how the solution could have been that simple. I tried multiple configurations of those checkboxes. None worked. And what about the sorting issue mentioned above (https://toolset.com/forums/topic/create-a-category-tree-with-nested-sub-cats/#post-2465067)?

#2465203

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

In nested view, as the top most view is set to query the term with no parent it will display all terms which do not have any parent and within that view you added the child view to display the next level terms so it will display the terms accordingly.

There is no way to track which term is already displayed before.

#2465219

Ed

My issue is resolved now. Thank you!