Skip Navigation

[Resolved] convert repeatable field group to post type

This support ticket is created 5 years, 5 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.

This topic contains 1 reply, has 1 voice.

Last updated by beatR 5 years, 5 months ago.

Author
Posts
#1250513

We started out designing and entering data into a repeatable field group. But it now looks like a more flexible custom post type with many to many relationship would be more useful.

- is there a way to "break out" the repeatable field group and make it a custom post type?
- or is there a way to show the repeatable field group as a custom post type in the backend? of course, a rfg already is a custom post type.

Thanks!

#1250517

i don't assume there's an easy one-button-solution for hacks like this 🙂 what i did now:

- listed all current content and parents of the rfg via a view
- create the new post type
- via SQL change all rfg post_type to the new custom post type
- create a new field group for the new custom post type
- change association of all fields in the rfg to the new field group
- delete the associations in wp_toolset_associations for the rfg (since i now use a many-to-many relationship, i dont think i could have just changed the relationship_id, since there is now an intermediary type)
- manually reconnected the posts using the list created in first step

it was just like 3 douzen posts, so easy to reconnect and i saved the time to re-enter the data.