Skip to main content
Cookbook Content

Create a Custom Post Type with Custom Fields using AI

Give your specialized content its own post type and fields, set up and ready to fill in.

Difficulty Intermediate
Time ~10 min
Tools run_wp_cli, rest_api

Prerequisites

A connected site with the free Code Snippets plugin installed, or ask the AI to install it as part of the task.

The prompt
I want to organize [type of content, for example client case studies] as their own content type in WordPress, separate from my blog posts. Create a custom post type called [name] with these custom fields: [list them, for example client name as text, industry as text, project value as a number]. Use the free Code Snippets plugin as the home for the registration so it survives theme and plugin updates, and register the fields for the REST API so they stay editable. Install Code Snippets first if it is not active. When it is set up, add one sample record with example values, then show me the record and confirm each field saved so I can spot-check it before I start adding my real content.

Already connected to WPVibe?

Skip the copy-paste. Just ask your AI for the “Create a Custom Post Type with Custom Fields using AI” recipe, or describe the task, and WPVibe runs these steps on your own site.

Not all of your content fits into posts and pages. Maybe you keep a directory of team members, a catalog of products you do not sell online, a roster of events, or a shelf of case studies. Force those into ordinary blog posts and they share the same feed, the same template, and the same handful of fields, so they never get the structure they deserve and every edit turns into a workaround.

WPVibe sets up a custom post type for exactly that content, with its own menu in your dashboard and its own fields, whether that is an author, a price, a date, or anything the records need. It writes the registration as a code snippet that runs on your site, so it survives theme switches and updates rather than vanishing with a theme. The fields are registered for the REST API too, which means your AI can read and write those records directly instead of you keying them in by hand.

Tell the AI what kind of content you are organizing and which fields each record needs. It creates the post type and fields, adds one sample record, and shows it to you so you can confirm the fields save before you commit. This uses the free Code Snippets plugin as the home for the registration, so have it installed first or ask the AI to install it as part of the job.

Outcome

A custom post type with custom fields on your site, visible in your dashboard and editable via REST, with one sample record proving it works.