From the course: WordPress: WP-CLI

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sidebars, widgets, and menus

Sidebars, widgets, and menus - WordPress Tutorial

From the course: WordPress: WP-CLI

Start my 1-month free trial

Sidebars, widgets, and menus

- [Instructor] Now that we have themes and plugins down, let's look at managing some of the auxiliary areas of our WordPress site: sidebars, widgets, and menus. Let's start with the sidebar command as that has only one subcommand. Let's type wp sidebar list and that will give us a list of all of the sidebars available in our current theme. Now, if we activate a new theme like astra, that list will change and we have a few more sidebar areas to work with here. We should keep these IDs handy as they'll be very useful for the widget command. Let's take a look at that now with wp help widget. You could see here that widget does all the heavy lifting for sidebars and widgets as far as WP-CLI is concerned. Admittedly, these functions work best on an already established site for widgets you're already familiar with. Doing most sidebar and widget work will rely heavily on visual content. There's also no way to get a general list…

Contents