ACF & PHP-API (WordPress)
Versie door Jeroen Strompf (overleg | bijdragen) op 1 aug 2022 om 10:00
How can you automatically manage ACF fields? In particular, fill in, delete and edit?
Not directly at database level
To start with some bad news: While ACF fields are stored in tables wp_options
or wp_postmeta
, you cannot write directly to these tables to create ACF fields. Then the 'context' is missing, eg a repeater. So you have to do it via an API call.
See also
Sources
- https://www.advancedcustomfields.com/resources/
- https://www.advancedcustomfields.com/resources/#functions - All PHP functions together. It's not complete, though!
- https://www.advancedcustomfields.com/resources/code-examples/