dynamic_sidebar not rendering sidebar

You should add the name and id parameters to your register_sidebar() argument array:

'name'=>'Sidebar Name',
'id'=>'sidebar-slug',

Like such:

register_sidebar(array(
    'name'=>'Sidebar Name',
    'id'=>'sidebar-slug',
    'before_widget' => '<section>',
    'after_widget' => '</section>',
    'before_title' => '<h3>',
    'after_title' => '</h3>',
));

Then call the id of the Sidebar in your dynamic_sidebar() call:

if ( ! dynamic_sidebar( 'sidebar-slug' ) ) {

}

By the way: you don’t need to include a function_exists( 'dynamic_sidebar' ) ) conditional; this functionality has been in WordPress since version 2.8.

Leave a Comment