Sidebars and widgets

Hello!

How to work with sidebars and widgets in Roots Themes?

I saw 3 sidebar:

  1. main sidebar
  2. side sidebar
  3. footer sidebar

main sidebar - both from the wordpress admin panel to add it to the widget?

side sidebar - to edit lib / config.php and widgets.php. how to remove the pages, if it is not needed? how to move from right to left?

footer sidebar - everything is clear, there is the ability to add widgets from the admin panel to edit the lib / widgets.php

How to add a sidebar to the header?

In what file lib / widgets.php or lib / custom.php me go to create custom widgets?

You want to register a new sidebar in /lib/widgets.php and then call it in your header file. For any syntax related to sidebars, duplicate and update the existing calls or see the WP Codex.

1 Like

Thank you, and see how the main main sidebar with the ability to add widgets from the admin panel?