Skip Navigation

[Resolved] Migrating Multiple single Image fields into a repeating Image field

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

Supporter timezone: Europe/London (GMT+00:00)

Author
Posts
#1082881

Hello there,

I was wondering if it is possible to migrate field data from multiple image fields into a repeating image field on mass for a post type.

We initially created the field group with multiple (up to 8) image fields, however we are experiencing a few issues so would like to change to using a single repeating image field.

However due to the large number of posts, we're trying to see if there is a way to migrate the data in one go.

Do you have any suggestions on how to go about this?

Thanks in advance.

#1083064

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You have up to 8 image fields—each with their own slug—assigned to posts, and you just want to convert them all to use the same slug, i.e. so there would be multiple instances of the same image field, is that right?

If so I can help you craft a script.

There would be repercussions for your templates, i.e. how you display the images, for example, but you are aware of that?

#1084103

Sorry for asking in this space. I was wondering if there's a way to limit the number of instances in a repeating field. For instance, allow only 5 images uploads in a repeating field.

I tried with this solution https://toolset.com/forums/topic/minimum-maximum-number-of-adding-images-in-cred-of-specific-repeating-field/ but I can't achieve it to work.