This function is still alive and works fine.
“Maybe you can copy the files to the new location, get the URL to the new location and then delete the attachment by using the wp_delete_attachment() function?”
“Maybe you can copy the files to the new location”
-> this works fine.
“get the URL to the new location”
-> I have the url.
“and then delete the attachment by using the wp_delete_attachment() function”
-> I wanted to do so when nothing works. I create so but a lot IDs in wp_posts. I was looking for a better solution.
I wanted to do this with a filter for “save_post”. I delete first the attachment from the media library and then i overwrite the attachment_id with the url of to the new location. Right?
excuse my bad English.
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!