Skip Navigation

[Resolved] Counting Grandchildren

This thread is resolved. Here is a description of the problem and solution.

Problem:

on my website I have Areas (which are parent of) Sectors (which are parents of) Routes.

I have successfully created a view to display the total number of Routes in a Sector.

Still, I am having troubles displaying the total sum of Routes in the grandparent Area.

Solution:

There isn't such kind of built-in feature within Views plugin, the shortcode [wpv-found-count] can only display post count for one view, but in your case, it is a nested view, so you will consider custom codes, see similar thread here:

https://toolset.com/forums/topic/nested-view-with-conditional-sums/

Relevant Documentation:

This support ticket is created 6 years 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by ivanT-7 6 years ago.

Assisted by: Luo Yang.

Author
Posts
#1141332
routes per area.jpg

Hi there,

on my website I have Areas (which are parent of) Sectors (which are parents of) Routes.

I have successfully created a view to display the total number of Routes in a Sector.

Still, I am having troubles displaying the total sum of Routes in the grandparent Area.

I have attached a screenshot of the View, hoping you may help me understand what is wrong.

Thank you so much
Ivan

#1141968

Hi,

There isn't such kind of built-in feature within Views plugin, the shortcode [wpv-found-count] can only display post count for one view, but in your case, it is a nested view, so you will consider custom codes, see similar thread here:
https://toolset.com/forums/topic/nested-view-with-conditional-sums/

#1145150

My issue is resolved now. Thank you!