yes, it would look something like code you posted:
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('sidebar2') ) : ?>
<?php endif; ?>
, but -
The code that you posted will only work if you have defined and registered such a sidebar (named : sidebar2)
in your theme´s php you should have a register_sidebar() function call.
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name'=> 'Sidebar 2',
'id' => 'sidebar2',
));
}
you can even customize it further with other parameters like .
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="offscreen">',
'after_title' => '</h2>',
If your theme already have such a sidebar defined and registered , then the code you have posted will work and the front side will display all the widgets that you put to that sidebar (on the admin side) .
If it is not defined by your theme you will need to define it or ADD it to the definitions of other sidebars .
Read more on the codex here and here about defining sidebars.