Support › Meta Box AIO › Multiple custom post types or one CPT + an options page?Resolved
Happy new year and I hope you're doing well.
I was hoping to get some advice on a project I'm working on. I'll be using Oxygen, Meta Box, and several UI-related plugins.
My client runs annual events with courses. These were in-person before COVID but are well-established already.
Each event has a schedule of courses, each with a different instructor/scholar. The schedule is essentially a list of the courses, with the scholars that teach it. Clicking on the name of a course takes you to the course or scholar directory for that event (it will be most efficient to have an overall directory rather than per-event, I imagine). Sometimes, a course is listed directly on the event page, with the full description and full scholar bio.
The scholar bios and course descriptions change frequently – they also overlap on several events. Sometimes a course is taught by a different scholar than usual. Sometimes a course is taught by several scholars.
The current website currently has no dynamic functionality in use, meaning every time there's an update for one of the bios or courses, I have to manually update them on every page they appear on.
Obviously, the solution here is to do this with dynamic data. I'm debating on which way would be the most efficient.
Here are options I'm considering:
1) An Event CPT with categories for each type of event, a Scholar CPT which will just have their bio, and a Course CPT which will have the course description and a custom field for which scholars teach that course. The biggest event would just be course titles, an anchor link to that course on the course directory (Course CPT archive page), scholar names, and an anchor link to that scholar on the scholar directory (Scholar CPT archive page).
– If I do this, I don't know what the most efficient way to pull the courses for that year's event would be. Bi-directional relationships look helpful here; but, is there a way to bulk add relationships? Or to add a relationship that does something like "all courses are connected to this event"?
2) An Event CPT with categories for each type of event. An 'options' page for scholars and another 'options' page for courses (or separated by tabs), both added via custom fields. This, to me, seems like the "easiest" way of doing it; but, is there anything I'm failing to consider here?
Sorry for the huge wall of text.
Any help or advice would be highly appreciated!
Thanks in advance.
I think point 1 is a good way to create relationships between
event <-> course <-> scholar. But there is no option to bulk select relationships between posts, you have to add it manually.
Or you can use the code to create the relationship by coding. Refer to this documentation https://docs.metabox.io/extensions/mb-relationships/#creating-connections-programmatically
Thank you, I ended up going with that setup!