Skip Navigation

[Resolved] Sports Team Statistics

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

This support ticket is created 5 years, 5 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)

Author
Posts
#1338323

Looking for some insight if I am asking for too much out of Toolset. I think I might be.

The site is for a single sports team (basketball) for which I would like to display statistics.

For the math functions I am referring to https://toolset.com/forums/topic/math-with-custom-fields-values/

I am thinking the post types are Games, Players, Statistics with taxonomies for Season, Game Date and Opponent.

I would need to have the following views:

1. Games displaying Players and their Statistics for that game (box scores)

2. Games displaying Players and their Statistics against Opponents (Opponent History)

3. Players displaying their individual Games and Statistics (individual player pages)

My thoughts:

Post type relationship, many to many, for Games to Players

Post type relationship, many to many, for Players to Statistics

Post type relationship, many to many, for Games to Statistics

For each of my views I could then display by the necessary taxonomy and build the calculations into each view as necessary.

My brain is failing at: What is the child and what is the parent? It seems like I want to have it both ways: games as the child of players in one view and while having players as the child of games in another. How can one player be the child of many games? I can't wrap my head around it.

The other option is: Should I shut up and buy a plugin? They are all so terrible tho 🙁

Thanks for any insight.

#1338381

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

First of all, I would suggest you to understand how many-to-many post relationship works:
=> https://toolset.com/documentation/post-relationships/#creating-the-same-site-using-a-post-relationship

What is the intermediary post type that holds the fields (with many-to-many this intermediary post type holds to the connection between two post types):
=> https://toolset.com/documentation/post-relationships/how-to-set-up-post-relationships-using-toolset/#relationship-fields-in-many-to-many-relations

HOw you can display the intermediary post type:
=> https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-information-from-intermediary-post-types

Then, check this video that will give you more understanding about how you can create many to many relationship as well connect the related posts in many-to-many relationship:
=> hidden link
=> hidden link

I suggest you should create a test site on our free test platform discover-wp.com using any of the available reference "Cooking Made Simple" site:
=> https://discover-wp.com/register/?site_type=1218

Once you successfully create the test site using reference site "Cooking Made Simple" goto Toolset => Relationships and there is many-to-many relationship configured "Equipment Recipes", so paly with this test site and learn how the related posts with many to many relationship displayed.

#1338947

My issue is resolved now. Thank you!