Skip Navigation

[Resolved] Is there a way to duplicate custom field groups?

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

Problem:
Can I duplicate Custom Field Groups?

Solution:
No.
But, you can re-use Fields, when you add a new Group and choose what fields to insert, you will see there is an option to "Choose from previously created fields".

100% of people find this useful.

This support ticket is created 6 years, 11 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by kristinA 6 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#529235

Is there a way to duplicate a custom field group? I have a large group and I'd like to duplicate it, make some changes, and have it be a different group for a different custom post type with many similar fields.

Is this possible? I don't see one in the list of all groups (that would be SO nice). Is there any sort of workaround that would save all that setup?

Thanks!

#529358

No, there is no way to duplicate a entire Post Field's Group.

But, you can re-use Fields, when you add a new Group and choose what fields to insert, you will see there is an option to "Choose from previously created fields".

I hope that helps.

#529934

Thank you! I've done that and yes, it helps a LOT! Saved me a lot of time.

But, I'm a little confused about what happens in the database (which I ought to understand a lot better than I do.) Am I going to have conflicts with different CPTs sharing the same fields? How is that structured in the database?

Thanks again!!!

#530742

No, that's not an issue.

See, WordPress stores Custom Fields in a table called postmeta.

This references to the Posts by the post_id (where the Meta Field is saved for), a meta_id which is an unique ID for the meta field, a meta_key, this is the name of the field, and the meta_value (value of the field)

Since each Custom field has this, it doesn't matter if 2 fields have the same slug (meta_key).
They still got a different meta_id and post_id.

You can just proceed working as you used to, if the Meta Key (name of field) is suitable for you after duplicating it.

#531012

Thank you! That helps a lot!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.