Skip to main content
Cookbook Content UiChemy

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

A post type, its taxonomy and its fields planned, checked in a dry run and created with UiChemy Custom Fields.

Difficulty Intermediate
Time ~10 min

Prerequisites

A site connected to WPVibe running UiChemy 5.5 or newer (tested on 5.5.2, free) on WordPress 6.9 or newer, with an administrator account.

The prompt
My WordPress site uses UiChemy. Set up a post type for [what you want to keep, for example team members, case studies or properties] with these fields: [each field and what it holds, for example role (text), photo (image), LinkedIn profile (link)]. [Group them by: a taxonomy such as department, or leave this out.] [Add these entries as drafts: each entry with its field values, or leave this out.]

1. Run discover_abilities with category uichemy. If uichemy/scaffold-content-model is not there, stop and tell me to install and activate the free UiChemy plugin (5.5 or newer, on WordPress 6.9 or newer) and to turn on Custom Fields under UiChemy, Settings, Features.
2. Run uichemy/get-content-model and rest_api GET /wp/v2/types. If a post type, taxonomy or field group already covers what I asked for, show it to me and ask before creating anything.
3. Run uichemy/list-field-types and use only types in its available list. If a field I asked for needs one of its pro_types (relationship, repeater), tell me it needs UiChemy Pro and suggest an available type instead.
4. Plan the model: a post_type_key of lowercase letters and underscores, at most 20 characters, that is not a WordPress name (post, page, attachment) or an existing type; plural and singular labels; supports title, editor and thumbnail; the taxonomy if I asked for one; and one field group with each field's name (lowercase letters and underscores), label and type. Run uichemy/scaffold-content-model with dry_run true and the model, and show me the plan it returns. Wait for my yes.
5. On my yes, run uichemy/scaffold-content-model with the same model and no dry_run. If it fails and left_behind lists anything, tell me which items are still on the site and stop; do not delete anything yourself. If it fails with nothing left behind, tell me the error, fix only what it names and show me the plan again.
6. Run uichemy/list-field-groups and confirm the group, its fields and its location rule for the new post type. Run rest_api GET /wp/v2/types and find the new type and its rest_base (it registers on the next request: if it is not there yet, run it once more). If I asked for a taxonomy, run rest_api GET /wp/v2/taxonomies and find its rest_base too.
7. For each entry I listed: if it has a term in the new taxonomy, find it with rest_api GET /wp/v2/TAX_BASE with search, and create it with rest_api_write POST /wp/v2/TAX_BASE and its name if it is missing. Then rest_api_write POST /wp/v2/REST_BASE with the title, status draft and, if it has a term, TAX_BASE set to a list holding the term id. For an image field, add the image with upload_media first and use the attachment id. For each field, one call at a time, run uichemy/update-field-value with field, object_id the new entry's id, value and dry_run true; if stored_value differs from what I gave, show me both and ask before saving it. Then run it again without dry_run. Finish each entry with uichemy/get-field-values and check every value.
8. Tell me where the new type is in the admin menu, list each entry with its edit link and its fields, and remind me the entries are drafts. Tell me plainly that showing these fields on a page needs UiChemy Pro's dynamic tags or theme code (uich_field_value), and that the free plugin stores and edits 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 UiChemy with AI” recipe from the WPVibe cookbook on my connected site.

Team members, case studies, properties, events: content with the same details every time belongs in its own post type with its own fields. Setting that up by hand means a post type screen, a taxonomy screen, a field group and a dozen field settings, and one wrong key breaks it without a word.

The AI checks what your site already has, plans the post type, any taxonomy and the fields with UiChemy’s free Custom Fields, and shows you a dry run first. On your yes it creates them in one step that rolls back if any part fails. Then it adds the entries you list as drafts, fills in their fields and checks each value was stored as you gave it.

Showing these fields on your pages needs UiChemy Pro’s dynamic tags or a few lines of theme code: the free plugin stores them and lets you edit them on each entry’s screen. Relationship and repeater fields need Pro too. To do this in ACF instead, use this recipe.

Outcome

A new post type with its fields in UiChemy Custom Fields, and your first entries saved as drafts with their fields filled.