I imported the sql data from one site to another. The field values show up when viewing the admin of each post, and show up on the live site after clicking ‘Update’, but don’t show up on the front end otherwise.
I’ve tried removing and re-importing all of the posts, and batch editing posts from published, to drafts and back to published, but no luck.
There are over 100 posts, I’d rather not manually open and Update each one. Any ideas?
How did you import the data? using the export/import tool with xml or by manually importing the .sql file?
Are the fields that are missing repeater or flexible fields?
I used the WordPress import tool to import the xml from a custom post type.
The fields missing are all text and wysiwyg.
Okay, The import tool for XML is really not that good to be honest with you.
The reason why you need to resave all the posts is because ACF uses an internal structure where each ACF field in the DB is paired with a “hidden” field which uses the structure of _field_name (the main field has field_name). These are probably not copied along with your XML file…
Also the reason why batch updating does not work is because it doesn’t actually update the entire post but rather looks for any settings you’ve set in the batch update editor and just updates those.
So I’m afraid your option is to either update each post manually, import them in another way or create a short script that updates the posts automatically. I’m not 100% sure the last option would work tho.
if you tell me the slug of your cpt I can probably create a simple snippet for you to test 🙂