Types Edit

Schema 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

object
All capabilities used by the post type.

Read only

Context: edit

description

string
A human-readable description of the post type.

Read only

Context: view, edit

hierarchical

boolean
Whether or not the post type should have children.

Read only

Context: view, edit

viewable

boolean
Whether or not the post type can be viewed.

Read only

Context: edit

labels

object
Human-readable labels for the post type for various contexts.

Read only

Context: edit

name

string
The title for the post type.

Read only

Context: view, edit, embed

slug

string
An alphanumeric identifier for the post type.

Read only

Context: view, edit, embed

supports

object
All features, supported by the post type.

Read only

Context: edit

taxonomies

array
Taxonomies associated with post type.

Read only

Context: view, edit

rest_base

string
REST base route for the post type.

Read only

Context: view, edit, embed

Top ↑

Retrieve a Type Retrieve a Type

Top ↑

Definition & Example Request 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

Top ↑

Arguments Arguments

context Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit

Top ↑

Retrieve a Type Retrieve a Type

Top ↑

Definition & Example Request 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>

Top ↑

Arguments Arguments

type An alphanumeric identifier for the post type.
context Scope under which the request is made; determines fields present in response.

Default: view

One of: view, embed, edit