Ability: acf/custom-post-types

Last updated Mar 30, 2026

Overview

Lists all ACF-registered custom post types.

Description

Returns an array of custom post types that were created using ACF’s post type registration feature. Includes post types that have AI access enabled.

Input

This ability accepts no input parameters.

null

Output

{
  "custom_post_types": [
    {
      "post_type": "product",
      "label": "Product",
      "plural_label": "Products",
      "description": "Products available for purchase",
      "public": true,
      "hierarchical": false,
      "show_in_rest": true,
      "rest_base": "products",
      "allow_ai_access": true,
      "ai_description": "E-commerce products with pricing and inventory"
    }
  ],
  "count": 1,
  "message": "Found 1 ACF custom post type(s)."
}

Output Properties

custom_post_types (array) Array of post type configuration objects.

count (integer) Total number of post types returned.

message (string) Human-readable status message.

Post Type Properties

Property Type Description
post_type string Post type key/slug (max 20 characters)
label string Singular label
plural_label string Plural label
description string Post type description
public boolean Whether publicly accessible
hierarchical boolean Whether supports parent/child relationships
show_in_rest boolean Whether exposed in REST API
rest_base string REST API base path
supports array Features the post type supports
taxonomies array Associated taxonomy slugs
has_archive boolean Whether has archive page
menu_icon string Dashicon or URL for admin menu
menu_position integer Position in admin menu
allow_ai_access boolean Whether AI access is enabled
ai_description string Description to help AI understand the purpose

Annotations

Annotation Value
readonly true
destructive false
idempotent true

Permissions

Requires the ACF capability (default: manage_options).

Example

List all custom post types registered through ACF.

Response:

{
  "custom_post_types": [
    {
      "post_type": "event",
      "label": "Event",
      "plural_label": "Events",
      "description": "Upcoming events and workshops",
      "public": true,
      "hierarchical": false,
      "supports": ["title", "editor", "thumbnail", "excerpt"],
      "taxonomies": ["event_category", "event_tag"],
      "show_in_rest": true,
      "rest_base": "events",
      "has_archive": true,
      "menu_icon": "dashicons-calendar-alt",
      "allow_ai_access": true,
      "ai_description": "Events with dates, locations, and ticket information"
    },
    {
      "post_type": "team_member",
      "label": "Team Member",
      "plural_label": "Team Members",
      "public": true,
      "hierarchical": false,
      "supports": ["title", "editor", "thumbnail"],
      "show_in_rest": true,
      "allow_ai_access": true
    }
  ],
  "count": 2,
  "message": "Found 2 ACF custom post type(s)."
}

Notes

  • Only post types registered through ACF are returned (not core or plugin post types)
  • Post types must have show_in_rest enabled to be fully accessible via abilities
  • Per-post-type abilities (query, create, view, update, delete) are registered dynamically for each post type with AI access
Supercharge Your Website With Premium Features Using ACF PRO

Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.

Explore Features View Pricing

PRO Features
ACF Blocks
Options Pages
PRO Fields
Repeater
Flexible Content
Gallery
Clone

Related