ACF & PHP-API (WordPress): verschil tussen versies
Naar navigatie springen
Naar zoeken springen
Regel 1: | Regel 1: | ||
− | + | 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 <code>wp_options</code> or <code>wp_postmeta</code>, 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 == |
* [[ACF (Advanced Custom Fields, WordPress)]] | * [[ACF (Advanced Custom Fields, WordPress)]] | ||
− | == | + | == Sources == |
* https://www.advancedcustomfields.com/resources/ | * https://www.advancedcustomfields.com/resources/ | ||
− | * https://www.advancedcustomfields.com/resources/#functions - | + | * https://www.advancedcustomfields.com/resources/#functions - All PHP functions together. It's not complete, though! |
* https://www.advancedcustomfields.com/resources/code-examples/ | * https://www.advancedcustomfields.com/resources/code-examples/ |
Versie van 1 aug 2022 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/