WpAcfFields
katanakit-js / WpAcfFields
Type Alias: WpAcfFields
Section titled “Type Alias: WpAcfFields”type WpAcfFields = z.infer<typeof WpAcfFieldsSchema>;Defined in: types/adapters/wordpress.ts:164
Container for ACF (Advanced Custom Fields) fields on a WordPress entity.
ACF fields appear on posts, pages, media, taxonomies, users, and options. Field names and types are defined by the site’s ACF configuration.
Example
Section titled “Example”const post = await useWpGetPost(42, { _fields: "id,title,acf" });if (post.ok && post.data.acf) { console.log(post.data.acf.hero_image); // image field console.log(post.data.acf.subtitle); // text field console.log(post.data.acf.gallery); // gallery field (array)}