Hooks: Sidebar

← Back to all hooks
Hook Return Usage
wpex_get_sidebar_template string

Returns correct template file name for your sidebar-NAME.php file

wpex_sidebar_class array

Returns array of classnames to be added to the #sidebar element.

wpex_sidebar_class array

Returns array of classes to be added to the sidebar-inner element.

wpex_get_sidebar string

Returns the name of the sidebar to use for the main sidebar area in the theme as defined by register_sidebar.

wpex_register_sidebars_array array

Returns array of sidebars to be registered by the theme. You can hook into this function to register a new sidebar location to ensure it follows the theme’s standards rather then using the core register_sidebar function. Each item in the array should be composed of a key equal to the sidebar name and a value equal to the label to display in the widgets panel.