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
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!
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.