The problem with image fields is that they store the Post ID of the image in the media library and the image does not exist in the other site and if the ID value does exist it is already used for another post. The first thing you need to do is to insert the image into the media library, get the new ID and then swap the ID from the site you’re copying from with the new ID for the site that you’re copying to.
You’ll have the same problem with any field type that stores ID values for other WP objects including relationship fields, post object fields, taxonomy fields, etc.
flex fields and repeaters will make a difference because you’ll need to know how ACF stores values in the DB in order to find the fields that need to be replaced with new ID values. Flex fields and repeaters are stored in a similar fashion.
A repeater or flex field will have meta keys like
a nested repeater field will look like
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF PRO’s Flexible Content field allows you to create smaller pieces of UI and compose them into whole flexible patterns. In our latest article, we show how to use it to create swappable site sections and integrate it all in a theme.https://t.co/ZRocH8oJSp— Advanced Custom Fields (@wp_acf) January 24, 2023
© 2023 Advanced Custom Fields.