Home › Forums › General Issues › How to move category ACF data to tag ACF data? › Reply To: How to move category ACF data to tag ACF data?
There is no automated way to move the data from one to the other.
Data is stored in the _termmeta table by the term_id. When you create a new “category” this is a new term with a new term_id even if the name/slug is the same as the original “tag”.
Moving the data would require doing an DB search for all the _termmeta connected to the old term_id and replacing it with the new term_id.
You could, potentially, use the WP create_term hook. In the hook you could search the tags for a matching slug and then copy all of the ACF fields using get_field() and update_field(). Note that you will need to use the field keys to do the update process and NOT the field names.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.