Set Up a Custom Post Type with Fields in Secure Custom Fields with AI
Describe the content, approve the plan, and get a post type, taxonomy, field group and one checked sample draft.
Prerequisites
A site connected to WPVibe running Secure Custom Fields 6.9.10 or newer (free, tested on 6.9.10) on WordPress 7.1 or newer (tested on 7.1.5), with an administrator account and Abilities API left on under SCF, Settings.
My WordPress site uses Secure Custom Fields (SCF). Set up a new content type for [what it holds, for example rental villas]. If a reply from a read-only ability ends with a note starting --- TRUNCATED, run that ability again with max_length 100000. If it is still cut, stop and tell me. Never conclude that a group or field is missing from a cut reply. If a create or change is cut, do not run it again: read the result back. 1. Run discover_abilities with category acf-field-management and confirm acf/register-custom-post-type, acf/register-custom-taxonomy and acf/register-field-group are there. If they are not, stop and check GET /wp/v2/plugins?_fields=plugin,name,status. If Advanced Custom Fields or ACF PRO is active, tell me this recipe is written for Secure Custom Fields and do not suggest installing SCF, because activating it deactivates them. If you cannot tell, do not suggest installing SCF until I confirm neither is active. Otherwise tell me to install or update the free Secure Custom Fields plugin (6.9.10 or newer, on WordPress 7.1 or newer) and check that Abilities API, Post Types & Taxonomies UI (for post types and taxonomies) and Options Pages UI (for options pages) are on under SCF, Settings. 2. Propose the post type (key, singular and plural name), any taxonomy to group the entries [for example amenities] (key, singular and plural name), a title for the field group, 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). Start every new field name with a word from the post type or group, for example villa_max_guests, and never use a name that, with an underscore in front, is a meta key WordPress or another plugin uses (for example price, sku, stock or thumbnail_id), because SCF also writes to that underscore key each time the entry is saved. Ask me yes or no whether the post type and taxonomy should be public, and tell me that no does not make published entries private. Warn me that once an entry is published without a password, anyone can read it and its field values, so private details such as door codes or owner phone numbers do not belong in these fields. Wait for my yes. 3. Check that nothing with those names exists already: call rest_api for GET /wp/v2/types and GET /wp/v2/taxonomies with fields set to all, and stop and tell me if either comes back empty. Run scf/list-post-types, scf/list-taxonomies and scf/list-field-groups. If a name is in use, stop and tell me. Also stop if an SCF post type or taxonomy key differs from mine only by a hyphen or underscore, because the two would share ability names. Also stop if a new key equals any rest_base in those lists. For each new post type and taxonomy key, call rest_api for GET /wp/v2/NEW_KEY with fields set to all, and stop and tell me unless the reply is the error rest_no_route, because a key on an existing route would take it over. For each new field name, run scf/list-fields with filter name set to it, and find each result's group in scf/list-field-groups by its parent. Stop and tell me unless every location rule of that group is post type is equal to a different post type, because two fields with one name on one entry share one value. Run scf/list-fields with filter type set to group, and treat as taken every name made of a group field's name, an underscore and a name in its sub_fields, at any depth, because SCF stores sub field values under those combined names. Run scf/list-fields with filter type set to clone. If either of these two lists returns an error, or the clone list returns any field, tell me that the stored names of group or clone fields cannot be checked, and wait for my yes before going on. If any other check in this step returns an error, apart from the rest_no_route you expect from the route check, stop and tell me, and create nothing. 4. Create the post type, the taxonomy and the field group with the three acf/register abilities. Send each key as post_type or taxonomy, each singular name as label, each plural name as plural_label and the field group title as title, with public set to my answer on the post type and the taxonomy, show_in_rest and enable_acf_abilities 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 NEW_POST_TYPE_KEY. Leave out the field keys so SCF generates them. Run acf/register-field-group once only: running it again creates a second group instead of updating the first. If any create returns an error, stop, tell me exactly what was created and what was not, and do not retry or delete anything. 5. Run discover_abilities with category wordpress-content-discovery 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 (under SCF), and that the fields will not show on my pages until my theme or a block displays them.
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 Secure Custom Fields 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 Secure Custom Fields that means three screens, a post type, a taxonomy and a field group, with settings that have to agree before the fields appear on an entry.
The AI proposes the post type, an optional taxonomy and the fields from your description, and waits for your yes. It checks that the names are free, creates all three with SCF’s own abilities so they appear in SCF’s screens, 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, because running the field group step again makes a second group. Keep private details out of these fields: once an entry is published without a password, anyone can read it and its field values, even on a post type that is not marked public. The fields do not appear on your pages until your theme or a block displays them.
Outcome
A new post type, an optional taxonomy and a field group in SCF, with one sample draft whose saved values you have seen.