`/wp/v2/widget-types`

Namespace: wp/v2
Route: /wp/v2/widget-types

Routes

  • Collection: /wp/v2/widget-types
  • Single: /wp/v2/widget-types/{id}

HTTP Methods

Collection methods: GET

Single methods: GET

Request Parameters

Collection GET

ParameterTypeRequiredDefaultDescription
contextstringfalseviewScope under which the request is made; determines fields present in response.

Single GET

ParameterTypeRequiredDefaultDescription
idstringfalseThe widget type id.
contextstringfalseviewScope under which the request is made; determines fields present in response.

Response Schema (Item)

FieldTypeDescription
idstringUnique slug identifying the widget type. (read-only)
namestringHuman-readable name identifying the widget type. (read-only)
descriptionstringDescription of the widget.
is_multibooleanWhether the widget supports multiple instances (read-only)
classnamestringClass name (read-only)

Authentication

  • Read: edit_theme_options; no write methods.

Example Requests

bash
curl -X GET "https://wordpress.org/news/wp-json/wp/v2/widget-types"
bash
curl -X GET "https://wordpress.org/news/wp-json/wp/v2/widget-types/text"

Example Response (trimmed)

json
{
  "id": 1,
  "_links": {
    "self": [{ "href": "/wp/v2/widget-types/1" }]
  }
}