underpin / sidebar-loader
Sidebar loader for Underpin
Installs: 127
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/underpin/sidebar-loader
Requires
- underpin/underpin: ^2.0
This package is auto-updated.
Last update: 2025-09-25 06:06:56 UTC
README
Loader That assists with adding sidebars (widget areas) to a WordPress website.
Installation
Using Composer
composer require underpin/sidebar-loader
Manually
This plugin uses a built-in autoloader, so as long as it is required before Underpin, it should work as-expected.
require_once(__DIR__ . '/underpin-sidebars/sidebars.php');
Setup
- Install Underpin. See Underpin Docs
- Register new sidebars menus as-needed.
Example
A very basic example could look something like this.
// Register sidebar underpin()->sidebars()->add( 'example-sidebar', [ 'name' => underpin()->__( 'Human readable name' ), 'id' => 'example', 'description' => underpin()->__( 'Human readable description' ), ] );
Alternatively, you can extend Sidebar
and reference the extended class directly, like so:
underpin()->sidebars()->add('sidebar-key','Namespace\To\Class');