Sidebars Edit

Schema

The schema defines all the fields that exist within a sidebar 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.

id

string
ID of sidebar.

Read only

Context: embed, view, edit

name

string
Unique name identifying the sidebar.

Read only

Context: embed, view, edit

description

string
Description of sidebar.

Read only

Context: embed, view, edit

class

string
Extra CSS class to assign to the sidebar in the Widgets interface.

Read only

Context: embed, view, edit

before_widget

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

Read only

Context: embed, view, edit

after_widget

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

Read only

Context: embed, view, edit

before_title

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

Read only

Context: embed, view, edit

after_title

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

Read only

Context: embed, view, edit

status

string
Status of sidebar.

Read only

Context: embed, view, edit

One of: active, inactive

widgets

array
Nested widgets.

Context: embed, view, edit

Top ↑

Retrieve a Sidebar

Top ↑

Definition & Example Request

GET /wp/v2/sidebars

Query this endpoint to retrieve a specific sidebar record.

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

Top ↑

Arguments

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

Default: view

One of: view, embed, edit

Top ↑

Retrieve a Sidebar

Top ↑

Definition & Example Request

GET /wp/v2/sidebars/<id>

Query this endpoint to retrieve a specific sidebar record.

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

Top ↑

Arguments

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

Default: view

One of: view, embed, edit

Top ↑

Definition

POST /wp/v2/sidebars/<id>

Top ↑

Example Request