Home › Forums › General Issues › Site Redesign – Maintain ACF's › Reply To: Site Redesign – Maintain ACF's
K, I was asking because there is quite a difference between how term content (categories) and post content (pages) is saved in ACF.
Basically, all of the acf fields are saves as custom fields in the postmeta table and each field has several values in the database.
The important field would be the post_id field in the database. If you wanted to move all of the field groups from all of the sub pages to the parent page without loosing the data you would need to change all of the references from the child post_id to the parent post_id, You would also need to attach the field groups to the correct page template being used.
The steps involved would be
If you have phpMyAdmin the last part could be accomplished by doing the query
UPDATE wp_postmeta SET post_id = 'PARENT ID' WHERE post_id = 'CHILD ID'
The above assumes that the table uses the standard WP table name and you would insert the actual post_id values where is says PARENT ID
and CHILD ID
While this could still be potentially time consuming, it would likely take less time than updating all that data by hand.
Once all the data is updated you can safely delete the child pages.
Make sure you back up your database, just in case.
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.