Specify 'primary' sidebar, so widgets land in correct sidebar when changing themes
|Reported by:||billerickson||Owned by:|
|Cc:||ncrice@…, travis@…, xoodrew@…, sabreuse@…, jared@…|
With the improvements to widget handling in 3.3, the widgets in a previous theme's sidebar are transferred to your current theme's sidebar. But there's no way to specify which sidebar should receive them.
For example, when you activate the Genesis theme it has three widget areas:
- Header Right
- Primary Sidebar
- Secondary Sidebar
If you install a fresh copy of WP and then activate Genesis, the Header Right widget area is populated with the 6 default widgets ( http://twitpic.com/8618x5 ). It's definitely not ideal for new users unfamiliar with this.
It would be great if there were some way to specify a primary sidebar when registering it, and that's the one the default widgets flow into.
register_sidebar( array( 'name' => 'Primary Sidebar', 'id' => 'primary-sidebar', 'primary' => true ); register_sidebar( array( 'name' => 'Secondary Sidebar', 'id' => 'secondary-sidebar' ); // Default: 'primary' => false
There might be better ways to handle this, but I think it should be done in WP core. If it's up to the themes to solve, we'll have to use solutions like this: https://gist.github.com/1623202
Change History (8)
- Cc travis@… added
- Summary changed from Specify 'primary' sidebar, so widgets land in right sidebar when changing themes to Specify 'primary' sidebar, so widgets land in correct sidebar when changing themes