We are updating and moving our website to wordpress, it is for a fishing club/group. It runs multiple tournaments in different districts every year. We want to be able to import past data and new data to maintain the site.
We have both youth and adults, but the set up for one should solve the other so I will just focus on one here.
We do have wp all import pro with the toolset types add-on pro
Tables we import with fields listed
Members: MemberID, name (first, last, middle and full) and district .
Tournament info: TournamentID, date, competitors, jrcompetitors, city, launch, year and district .
Tournament results: TournamentID, MemberID, fish day 1, total weight, place and points .
So, we are looking to reference one table to another, example when we are listing results, it pulls the competitors name from the members table, so member #15 would be Tom Smith, also allowing us to list all of the tournaments and even the stats from each tournament, under Toms profile page, that he has taken part in.
The member id being the shared field between tables, or the tournament Id being shared between the tournament info and results. So they are going to be unique.
How do I do this? What am I missing?
Hello,
In your case, you can try these:
1) Setup two post types:
- Members (with custom fields: MemberID, name (first, last, middle and full) and district )
- Tournament info(with custom fields: TournamentID, date, competitors, jrcompetitors, city, launch, year and district)
https://toolset.com/course-lesson/creating-a-custom-post-type/
2) Setup many-to-many relationship between post types "Members" and "Tournament info" with a intermediary post type "Tournament results", in this intermediary post type, setup custom fields: fish day 1, total weight, place and points
https://toolset.com/course-lesson/many-to-many-post-relationships/
3) So in the single "Members" post, you can display the related "Tournament info" post information or "Tournament results" post information :
https://toolset.com/course-lesson/many-to-many-post-relationships/#displaying-related-posts
And you can follow our document to setup CSV files, and import the posts with relationships:
https://toolset.com/course-lesson/how-to-import-content-into-wordpress-using-csv/