Skip Navigation

[Resolved] Get the count number of grouped by items

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 5 replies, has 2 voices.

Last updated by Minesh 1 year, 3 months ago.

Assisted by: Minesh.

Author
Posts
#2698770

Hello, i have a table with three attributes:
"Name:string", "Date:datetime","Donation:boolean"

"paul", "01/01/2023","1"
"mary","10/10/2023","0"
"paul", "01/01/2022","1"
"jean", "11/11/2022","1"

i would like to create a view to show a list as shown below:

"paul", 2
"jean", 2
"mary",0

how can i create this list view?

thank you in advance

#2698788

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I would like to know little bit more about your structure.

Is Name stored as custom field value or post title? and what about other columns?

#2698789

Hello, "name" and other columns are all Custom Fields. I use the "post_title" as a "placeholder" field (name + " - " + data) but honestly I only use it because it's mandatory.

"paul - 01/01/2023" , "paul", "01/01/2023","1"
"mary - 10/10/2023" , "mary","10/10/2023","0"
"paul - 01/01/2022" , "paul", "01/01/2022","1"
"jean - 11/11/2022" , "jean", "11/11/2022","1"

#2698791

Minesh
Supporter

Languages: English (English )

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

There is no such feature available to group the posts but fortunately I'm thinking of workaround that should work for you.

If you can share admin access details. I would like to see your current structure or I can offer you sandbox site where you can create such structure with demo content and then I will try to offer you the workaround.

*** 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.

#2698806

Minesh
Supporter

Languages: English (English )

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

I see you have created multiple post-relationship using same post type.
- hidden link

I take example of the post relationship "Donatori Donazioni".

I've created the following view "show-post-title-donatori" that will list the "Donatori" post:
- hidden link

I've created another view "show-related-donazioni" that will show count of Donazioni posts using shortcode: [wpv-found-count] and this shortcode added to the following view's loop output section outside the view's loop and added the following post-relationship query filter.
- hidden link

Filter by post relationship or repeatable fields group owner
Select posts in a Donatori Donazioni relationship that are a related to the current post in the loop.

Then added the above view "show-related-donazioni" inside the "show-post-title-donatori" view's loop output as you can see:
- hidden link

   <li>[wpv-post-link]:[wpv-view name="show-related-donazioni"]</li>

Created the following page and added the "show-post-title-donatori" view to it:
- hidden link

Can you please confirm it works as expected now.

#2698964

Minesh
Supporter

Languages: English (English )

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

where do you see second slider? You should delete the existing slider and try to add only view that is displaying geo related post.