Why are my widgets not saving when being added to a sidebar?

Its the camel-case in the widget ID. The following works:

add_action( 'widgets_init', 'ditto_register_sidebars' );

function ditto_register_sidebars() {
    register_sidebar(array(
        'name' => __( 'Right Hand Sidebar' ),
        'id' => 'right-bar',
        'description' => __( 'Widgets in this area will be shown on the right-hand side.' )
    ));
}

Per the Codex:

id – Sidebar id – Must be all in lowercase, with no spaces (default is
a numeric auto-incremented ID).

http://codex.wordpress.org/Function_Reference/register_sidebar

Leave a Comment