Skip to main content
Cookbook Content ACF

Set Up a Custom Post Type with Fields in ACF with AI

Describe the content, approve the plan, and get an ACF post type, taxonomy and field group with a sample entry to check.

Difficulty Intermediate
Time ~10 min

Prerequisites

A site connected to WPVibe running Advanced Custom Fields 6.8.12 or newer (tested on 6.8.12, the free version) on WordPress 6.9 or newer, with ACF's abilities on (they are by default; this recipe checks).

The prompt
My WordPress site uses ACF. Set up a new content type for [what it holds, for example rental villas].

1. Run GET /wp/v2/plugins?search=advanced-custom-fields with fields set to plugin,name,version,status. If ACF is not active, or its version is older than 6.8.12, stop and tell me to install or update it: older versions name these abilities differently. Then run discover_abilities with category acf-field-management. If acf/field-groups is not there, stop and tell me to switch on ACF, Settings, Features tab, AI & GEO, Abilities API; ACF's abilities also need WordPress 6.9 or newer. Confirm acf/register-custom-post-type, acf/register-custom-taxonomy and acf/register-field-group are there. If any is missing, stop and tell me to switch on Post Types & Taxonomies UI in ACF, Settings, Features tab, Interface, and save.
2. Propose the post type (key, singular and plural name), any taxonomy to group the entries [for example amenities], and the fields with their types [for example nightly rate as a number, bedrooms as a number, view as a select with ocean, garden and pool]. Keys are lowercase letters, numbers and underscores, 20 characters or fewer for the post type, and never a WordPress reserved term (for example type, year, name, author, order or category). Wait for my yes.
3. Check that nothing with those names exists already: GET /wp/v2/types and GET /wp/v2/taxonomies, each with fields set to all, and run acf/field-groups for the group titles. If acf/field-groups comes back cut, run it again with max_length 100000. A key that differs only by a hyphen instead of an underscore counts as the same, because ACF would not give it abilities. If something exists, stop and tell me.
4. Run get_ability_info on acf/register-custom-post-type and acf/register-custom-taxonomy for their inputs, but not on acf/register-field-group: its schema is very long. Create the post type and the taxonomy with show_in_rest and enable_acf_abilities on, a one-line ai_description on each, and the taxonomy's post_types set to the new post type only. Then create the field group with acf/register-field-group and this input: title; fields, a list with label, name and type for each field, plus choices (value to label) for a select field; location, a list holding one list with one rule: param post_type, operator ==, value POST_TYPE_KEY (the new key); show_in_rest true; enable_acf_abilities true; and ai_description. Run acf/register-field-group once only: running it again creates a second group instead of updating the first.
5. ACF names these abilities after the key, with underscores turned into hyphens: a post type with the key team_member gets acf/list-team-member-posts, acf/create-team-member-post, acf/view-team-member-post and acf/update-team-member-post; a taxonomy with the key amenity gets acf/list-amenity-terms and acf/create-amenity-term. Run discover_abilities with category wordpress-content-discovery for the exact names. Create one sample entry as a draft with every field filled in, using the new post type's create ability, then read it back with its view ability and show me the saved values.
6. Tell me where the post type, taxonomy and field group are in wp-admin (ACF, Post Types; ACF, Taxonomies; ACF, Field Groups), and that the fields will not show on my pages until my theme or a block displays them.
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Set Up a Custom Post Type with Fields in ACF with AI” recipe from the WPVibe cookbook on my connected site.

Rental villas, team members, events, case studies: content that is not a blog post needs its own type and its own fields. In ACF that means three screens, a post type, a taxonomy and a field group, each with settings that have to agree with each other before the first entry can be saved.

The AI proposes the post type, an optional taxonomy and the fields from your description, and waits for your yes. Then it creates them with ACF’s own abilities, so they appear in ACF’s screens like anything you built by hand, adds one sample entry as a draft, and reads it back so you can see the fields save.

Decide the fields before you run it. ACF’s field group ability always creates a new group, so running it again makes a second group with the same name instead of updating the first; change fields later in ACF’s field group editor. The fields do not appear on your pages until your theme or a block displays them. No ACF? This recipe builds the same thing with a code snippet.

Outcome

A new post type with its taxonomy and fields, registered in ACF, and a sample draft entry with every field filled in.