[wp-trac] [WordPress Trac] #19846: Specify 'primary' sidebar, so widgets land in right sidebar when changing themes

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 16 21:49:42 UTC 2012


#19846: Specify 'primary' sidebar, so widgets land in right sidebar when changing
themes
--------------------------+-----------------------------
 Reporter:  billerickson  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  3.3.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19846>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list