Schema
The schema defines all the fields that exist within a type record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.
capabilities
|
All capabilities used by the post type.
JSON data type: object Read only Context: |
description
|
A human-readable description of the post type.
JSON data type: string Read only Context: |
hierarchical
|
Whether or not the post type should have children.
JSON data type: boolean Read only Context: |
viewable
|
Whether or not the post type can be viewed.
JSON data type: boolean Read only Context: |
labels
|
Human-readable labels for the post type for various contexts.
JSON data type: object Read only Context: |
name
|
The title for the post type.
JSON data type: string Read only Context: |
slug
|
An alphanumeric identifier for the post type.
JSON data type: string Read only Context: |
supports
|
All features, supported by the post type.
JSON data type: object Read only Context: |
has_archive
|
If the value is a string, the value will be used as the archive slug. If the value is false the post type has no archive.
JSON data type: string or boolean Read only Context: |
taxonomies
|
Taxonomies associated with post type.
JSON data type: array Read only Context: |
rest_base
|
REST base route for the post type.
JSON data type: string Read only Context: |
rest_namespace
|
REST route's namespace for the post type.
JSON data type: string Read only Context: |
visibility
|
The visibility settings for the post type.
JSON data type: object Read only Context: |
icon
|
The icon for the post type.
JSON data type: string or null Read only Context: |
Retrieve a Type
Definition & Example Request
GET /wp/v2/types
Query this endpoint to retrieve a specific type record.
$ curl https://example.com/wp-json/wp/v2/types
Arguments
context
|
Scope under which the request is made; determines fields present in response.
Default: One of: |
Retrieve a Type
Definition & Example Request
GET /wp/v2/types/<type>
Query this endpoint to retrieve a specific type record.
$ curl https://example.com/wp-json/wp/v2/types/<type>
Arguments
type
|
An alphanumeric identifier for the post type. |
context
|
Scope under which the request is made; determines fields present in response.
Default: One of: |