Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reusing field groups #1592

Open
seaj1one opened this issue Jun 30, 2024 · 0 comments
Open

Reusing field groups #1592

seaj1one opened this issue Jun 30, 2024 · 0 comments

Comments

@seaj1one
Copy link

On the frontend there's a big drive to DRY (Don't repeat yourself). There a desire for page builders to add components as a feature. I'd love to see Meta box do the same thing.

Currently, as I'm creating custom field groups, I'm repeating myself. So If I creating a custom field group to mange the content for say a Hero, features and services section, I create custom fields for the title and introduction text for each section. I may want to manage the content for a card using Meta Box that has the same content structure .i.e. title, text and image. Again I have to create custom fields for each section.

I see that you have a function called "array_merge()" Source which solves that problem. While I've never implemented this, I suspect it will take me more time writing code over a GUI.

I'm suggesting a reusable template custom field area where you create custom field groups that are not assigned. It's used as a blueprint to use on any post type or page and across websites.

So what I'm thinking is to add an option called existing custom field group when you select add field or a similar name. I'm thinking that it should always be nested within another field group to avoid conflict with another custom field group. You can then select which custom field group to reuse from a list and be searchable.

For the developers, would you like to see this feature as an extension or part of the core Meta Box?

Is there anything that I've missed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant