[wp-trac] [WordPress Trac] #20360: New Sidebar Takes Over Previous Sidebar Widgets

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 5 00:09:43 UTC 2012


#20360: New Sidebar Takes Over Previous Sidebar Widgets
--------------------------+-----------------------------
 Reporter:  imikedesigns  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3.1
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 When creating a new sidebar in a theme already utilizing a sidebar, the
 new sidebar takes on the widgets of the sidebar previously occupying that
 place of order.  For example, a theme currently has these sidebars, with
 widgets in use:

 Sidebar
 Footer

 Adding a new sidebar in a array:


 {{{
 $sidebars = array('Home Page Sidebar','Sidebar','Footer');

 foreach ($sidebars as $sidebar) {

   register_sidebar(array('name'=> $sidebar,

     'before_widget' => '<article id="%1$s" class="widget %2$s"><div
 class="container">',

     'after_widget' => '</div></article>',

     'before_title' => '<h3>',

     'after_title' => '</h3>'

   ));

 }
 }}}

 Home Page Sidebar takes the widgets of the Sidebar when it takes in place
 in line.

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


More information about the wp-trac mailing list