Hi, I am developing my own WP framework and currently I am working on the options panel. Now, I want to add an option to create as many sidebars as the user wants. Now, this is my code:
// when the button is clicked..
function register_new_sidebars() {
register_sidebar( array(
'name' => __( 'Test the panel', 'gateway' ),
'id' => 'test-options-panel',
'description' => __( 'The Test widget area', 'gateway' ),
'before_widget' => '<li class="widget-container %2$s" id="%1$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'widgets_init', 'register_new_sidebars' );
It doesn’t work. When I wrap it with var_dump it returns the ID of the sidebar, which actually says the function works but it just doesn’t add the sidebar (in the widgets page).
Thanks.

