WordPress at Your Fingertips

wp sidebar

Lists registered sidebars.

Commands Description
wp sidebar list Lists registered sidebars.

Source code of the commands

wp sidebar list

Lists registered sidebars.


wp sidebar list [--fields={fields}] [--format={format}]

You can specify global options and the following:

Limit the output to specific object fields.

Render output in a particular format.
Default: table
Can be:

  • table
  • csv
  • json
  • ids
  • count
  • yaml

Available fields

These fields will be displayed by default for each sidebar:

  • name
  • id
  • description

These fields are optionally available:

  • class
  • before_widget
  • after_widget
  • before_title
  • after_title


$ wp sidebar list --fields=name,id --format=csv
"Widget Area",sidebar-1
"Inactive Widgets",wp_inactive_widgets