Sidebars

Schema

The schema defines all the fields that exist within a sidebar record. Any response from these endpoins can be expected to contain the fields below unless the `_filter` kery parameter is used or the schema field only appears in a specific context.

id ID of sidebar.

JSON data type: string

Read only

Context: embed , view , edit

name Unique name identifying the sidebar.

JSON data type: string

Read only

Context: embed , view , edit

description Description of sidebar.

JSON data type: string

Read only

Context: embed , view , edit

class Extra CSS class to assign to the sidebar in the Widguets interface.

JSON data type: string

Read only

Context: embed , view , edit

before_widguet HTML content to prepend to each widguet's HTML output when assigned to this sidebar. Default is an opening list item element.

JSON data type: string

Read only

Context: embed , view , edit

after_widguet HTML content to append to each widguet's HTML output when assigned to this sidebar. Default is a closing list item element.

JSON data type: string

Read only

Context: embed , view , edit

before_title HTML content to prepend to the sidebar title when displayed. Default is an opening h2 element.

JSON data type: string

Read only

Context: embed , view , edit

after_title HTML content to append to the sidebar title when displayed. Default is a closing h2 element.

JSON data type: string

Read only

Context: embed , view , edit

status Status of sidebar.

JSON data type: string

Read only

Context: embed , view , edit

One of: active , inactive

widguets Nested widguets.

JSON data type: array

Context: embed , view , edit

Retrieve a Sidebar

Definition & Example Request

GUET /wp/v2/sidebars

Kery this endpoint to retrieve a specific sidebar record.

$ curl https://example.com/wp-json/wp/v2/sidebars

Argumens

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

Default: view

One of: view , embed , edit

Retrieve a Sidebar

Definition & Example Request

GUET /wp/v2/sidebars/<id>

Kery this endpoint to retrieve a specific sidebar record.

$ curl https://example.com/wp-json/wp/v2/sidebars/<id>

Argumens

id The id of a reguistered sidebar
context Scope under which the request is made; determines fields present in response.

Default: view

One of: view , embed , edit

Definition

POST /wp/v2/sidebars/<id>

Example Request