Lab 002

Plugin or Custom Code? Define One Requirement Both Ways

Compare a Custom Post Type UI configuration with native WordPress registration for the same Application record.

Evidence
Documented comparison
Status
Reference
Audience
builder

The requirement.

Editors need a public “Application” content type with a title, body, summary, featured image and revisions. Records should appear under an applications URL path and work with the block editor. That is the requirement we compare here.

Route A: configure Custom Post Type UI.

CPT UI provides controls for registering post types and taxonomies. Its job is registration; a finished public experience still needs templates and editorial decisions. Custom Post Type UI.

SettingValue for this example
Post type slugowl_application
Plural / singular labelsApplications / Application
PublicTrue
Has archiveTrue
Show in RESTTrue
Rewrite slugapplications
SupportsTitle, editor, excerpt, thumbnail, revisions

Keep an exported configuration or a precise settings record with the project. A screenshot of the finished archive cannot tell the next builder which registration choices produced it.

Route B: declare the same registration.

WordPress’s registration API expresses those choices in code. The excerpt below illustrates the definition; it is not a packaged plugin. The official handbook explains placement and registration behavior. Registering custom post types.

register_post_type( 'owl_application', [
    'labels' => [
        'name' => 'Applications',
        'singular_name' => 'Application',
    ],
    'public' => true,
    'has_archive' => true,
    'show_in_rest' => true,
    'rewrite' => [ 'slug' => 'applications' ],
    'supports' => [
        'title', 'editor', 'excerpt', 'thumbnail', 'revisions'
    ],
] );

For a maintainable implementation, registration belongs in a plugin that remains active when the visual theme changes. Production code also needs the appropriate initialization hook, internationalized labels and a considered permissions model.

What changes between the approaches.

DecisionCPT UIFocused registration code
Who can adjust itA person comfortable with the settings interface.A person able to review and release code.
Where the definition is maintainedPlugin configuration and its exported record.A versioned source file.
Update responsibilityPlugin updates plus site checks.Local code maintenance plus site checks.
What neither route suppliesApproved application claims, relationships and a finished visitor journey.Approved application claims, relationships and a finished visitor journey.

Choose based on who will maintain the definition. An editor-operated site and a code-managed site may reasonably make different choices.

The checks a real installation still needs.

  • Create and reopen an Application record as the intended editor.
  • Confirm revisions and expected publishing permissions.
  • Check single and archive URLs after the planned rewrite-rule refresh.
  • Change the visual theme in a sandbox and inspect content availability.
  • Export representative content and its required registration settings.
  • Check the empty archive and a record with no featured image.

Do not run both registrations under the same post-type name in one comparison site. Use separate clean test environments or an explicit switch between approaches.

Adapt this pattern.

Replace Applications with Courses, Services or Projects. Preserve the distinction between defining a record and designing how people use it. The comparison is most useful when the requirement stays identical on both sides.

For a working content relationship example, continue to Lab 004.

Sources and further reading

Primary documentation checked September 14, 2026. Product behavior and terms can change; follow the source for current details.