Home › Forums › General Issues › Site Redesign – Maintain ACF's
I’ve searched the forum and found a similar post but there are no replies. Hopefully someone can shed my light on this for me.
I’m thinking of collecting content from multiple pages into a single page and would like to if it’s possible to maintain ACF data easily.
My scenario: I have a series of pages, each with ACF’s. 2 have repeater fields with up to 200 rows)
Page speed time is OK at the moment.
Is collecting all content into a single page advisable? Is it likely to impact significantly on the page load time?
How can I achieve this without having to do all data entry again?
It really depends on what type of pages these pages are.
I’m assuming that
http://www.mydomain/category/product is a category (term) page. The data for a category is stored in options.
Are all of the other pages sub-categories?
Or are all my assumptions wrong?
I’m not very technical and quite new to WP so please forgive my bad explanation…
Each of my pages is a ‘page’ in WP and I just assign a parent.
My category is actually a country. I have multiple boats in each country. For each boat I assign its parent page as the country to which it belongs. Each boat has series of 4 child pages (always the same for every boat) to which I assign the parent page as the boat.
I hope that makes sense?
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.
Thanks John. That makes sense. I will build a test version of the site locally and see how I do.
You must be logged in to reply to this topic.
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’re hard at work on ACF 6.1, and Beta 1 is now available 🚀— Advanced Custom Fields (@wp_acf) March 16, 2023
This release includes custom post type and taxonomy registration, an improved experience when selecting field types, PHP 8.1 and 8.2 compatibility, and more!
Let’s take a look 🧵https://t.co/Y0WcAT11l4
© 2023 Advanced Custom Fields.