Skip Navigation

[Resolved] grouping posts by category – two levels

This support ticket is created 6 years, 10 months 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 3 replies, has 2 voices.

Last updated by Minesh 6 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#604120

I'm following this tutorial: https://toolset.com/2015/07/how-to-group-posts-by-category/

Except, I need to nest two levels deep. Here's the structure I'm trying to achieve

Language
-Topic
--Post
--Post
--Post

So for example:

English
-Topic 1
--Post1
--Post2
--Post3

-Topic 2
--Post1a
--Post2a
--Post3a

Spanish
-Topic 1
--Post1
--Post2
--Post3

-Topic 2
--Post1a
--Post2a
--Post3a

I tried creating a child view filtered by a parent. and the parent filtered by its own parent, but that caused the site to time out.

Can you tell me if there's a way to accomplish this? Perhaps the answer is some custom PHP to nest results by topic and then only have one level of child-parent view?

Thanks

#604292

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - yes you need to use nested view's for such structure. One view that loop through your taxonomy and one view that will loop through your posts belongs to the taxonomy.

if you are not sure how to do it I can fix it for you but I need to review your structure first in order to share solution with you. Is "Topic 1" in your case is taxonomy term or post?

#604509

My TOPIC is actually a custom taxonomy.

I found this tutorial for grouping entries by Year and Month:
https://toolset.com/2013/10/how-to-group-views-results-by-year-and-month/

That sort of works. But would it be better to nest three levels?

Group by Topic INSIDE Group By Language INSIDE Parent View?

#604739

Minesh
Supporter

Languages: English (English )

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

Well - if that works for you, you can use it but if you want nested view's solution then I need to review your structure and I need problem URL where you want to display the results as well as exact structure, how you want to display it.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) 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 would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

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