Settings Options instead of CPT and custom fields
-
Hello everyone,
I want to build a plugin, nothing weird there, but I want to build it in a way that the plugin gives you a submenu page with some initial option fields to fill, and then, when the user fills the fields, the plugin will automatically generate a set of fields to add more information.
For example:
The plugin I want to build is to generate and edit the info of a sports league.
You enter the submenu page, the plugin will ask you to give it the number of teams in your league, how many weeks the current season will last and how many games every team will play in the season, form there, the plugin will automatically generate the season calendar, and that calendar will be editable to place game scores and other info, also the plguin will generate a section (inside the same submenu page) for every team, and in that section you will be able to edit the team’s roster and players info.
This can be achieved creating custom post types for seasons, games, teams and players, but I’m trying to find an alternative to that beacuse of two reasons, the first one is that following that approach I’ll have to use a lot of custom metaboxes and custom fields, and I don’t want to have to redo all of that once Gutenberg is integrated with the WP core. The second one is that, in my experience, when a plugin has many interconected custom post types, it gets complicated for the user.
Remember the above is just an example to make things more clear, don’t pay much attention to the technical details to build that.
My question is: if I want to have all of the information in a submenu page and store it in the options meta, is a good or bad idea and why?
Is there an alternative to achieve that without using custom post types?
If, eventually, I want to put that plugin in the WP plugin repository, will it be rejected because of some broken rule?
Can you list some advantages or disadvantages for both (or any other) approches?Thank you in advance for the answers, hope I made myself clear.
M
- The topic ‘Settings Options instead of CPT and custom fields’ is closed to new replies.