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 or newer (tested on 6.8.10, the free version) on WordPress 6.9 or newer, with ACF's AI abilities turned on (this recipe does it).

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

1. Run discover_abilities and confirm acf/register-custom-post-type, acf/register-custom-taxonomy and acf/register-field-group are there. If they are not, stop and tell me to turn on ACF's AI abilities first.
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 /wp/v2/taxonomies, and run acf/field-groups. If something does, stop and tell me.
4. Create the post type, the taxonomy and the field group with the three acf/register abilities, with show_in_rest and allow_ai_access on, a one-line AI description on each, the taxonomy's post_types set to the new post type only, and the field group's location rule set to post type is equal to [the new key]. Run acf/register-field-group once only: running it again creates a second group instead of updating the first.
5. Run discover_abilities again to find the new acf/create- and acf/view- abilities for the post type. Create one sample entry as a draft with every field filled in, then read it back with the view ability and show me the saved values.
6. Tell me where the post type, taxonomy and field group are in wp-admin, 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.