Answer the question
In order to leave comments, you need to log in
How to update acf wordpress extra fields when loading excel spreadsheet?
Hello!
There is a site on wordpress with localization in 3 languages ( wmpl ), it also uses additional fields acf .
Is it possible to periodically download updated data from acf fields through an excel table (csv), comparing them by an additional id field ?
Yes, there are plugins like WP Import Export Lite and WP All Import , but I could be wrong, but none of them seems to know how to set up a filter for uploaded data comparing by acf field + I need to update data on all localized versions of posts.
Answer the question
In order to leave comments, you need to log in
I somehow looked for a solution and ended up writing by hand. In general, the logic looked like this:
1. I took the old PHPExcel library . It converts the excel file into a regular array
2. The array into a loop, in the loop through the column from the post id you get the desired field using get_post_meta()
3. Compare with the data from the table, if different, push new ones withupdate_post_meta()
Is it possible to periodically download updated data from acf fields through an excel table (csv), comparing them by an additional id field?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question