Navigation überspringen

[Gelöst] Counting children of each parent

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

I want to count the total of children to parent belonging to the current user is the author.

Solution:

There isn't such a built-in feature within Views plugin, the shortcode [wpv-found-count] works for only one view, see our document:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count

In your case, it needs custom codes, for example, this thread:

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

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count

This support ticket is created vor 6 Jahren. 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)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 6 Jahren.

Assistiert von: Luo Yang.

Author
Artikel
#1167647

Hey there tried this one with the solution:
https://toolset.com/forums/topic/counting-children/

but on my side this doesn´t work.
I have created a child view withe the relationship set to the parent view.
Put the shortcode in the loop editor outside the loop
Insert the child view in the parent view.
It says many times the items are not found.

#1167668

Therefore my title of this thread is wrong.
I want to count the total of children to parent belonging to the current user is the author.

My child view:
relationship to the parent view.
put the count shortcode in the output editor

Parent view:
current user is author
insert the child view

i only get the total of each parent. But i need to get the total of all children to that users parents

cheers

#1168414

Hello,

The thread you mentioned above, is for counts of each child view, in your case, it needs to count the total of children views.
It is different problem, and there isn't such a built-in feature within Views plugin, the shortcode [wpv-found-count] works for only one view, see our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-found-count

In your case, it needs custom codes, for example, this thread:
https://toolset.com/forums/topic/nested-view-with-conditional-sums/

In the child view, you can sum the child views found count like this:

[add-to-total][wpv-found-count] [/add-to-total]
#1169759

My issue is resolved now. Thank you!

#1170067

You are welcome