Home › Forums › General Issues › Copy Image / Media Uploads to Another Page › Reply To: Copy Image / Media Uploads to Another Page
To be honest, I don’t know why your code is not working. Copying images from one blog to another is not something I have any experience with.
And the difficulty with updating acf values to point to new images, when you’re dealing with unknowns like repeaters and flex fields, well, I don’t thing that there’s any real way to do this dynamically, especially by using get_post_meta() to get the values.
The best way that I can thing of would be to work through ACF using the ACF function to get values and use get_field_object() https://www.advancedcustomfields.com/resources/get_field_object/, then do whatever you need to do with the images to transfer them. After getting all the values this way and moving the images you can then use update_field to update the values of the post where you’re copying to. https://www.advancedcustomfields.com/resources/update_field/.
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?
— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.