I create a new file, say “sidebar-top”. I make it dynamic

<?php if ( function_exists ( dynamic_sidebar(2) ) ) : ?> 

Then I go to the function, and register it.

 register_sidebar(array( 'name'=>'sidebar-top', 'before_widget' => '<div class="site-description">', 'after_widget' => '</div>' 

))

Next, I call this sidebar in need I place?

    1 answer 1

    I also need an id in the sidebar to call it dynamic_sidebar('st') , in my case id = st

     register_sidebar( array( 'name' => 'sidebar-top', 'id' => "st", 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => "</li>\n", ) );