function Y_widget_register(){
     'name'=>esc_html__( 'Sidebar', 'Y-07' ),
     'id'=> 'y-sidebar',
     'description'=>'Dynamic Right Sidebar',
    'before_widget' => '<section id="%1$s" class="y-widget %2$s">',
        'after_widget'  => '</section>',
     'before_title'  => '<h2 class="y-widget-title">',
     'after_title'   => '</h2>'

  ) );

add_action('widgets-init','Y_widget_register' );

I tried different styles previous versions too but not working, what possibilities making my code not to work.

Read more here: Tried in different ways but sidebar not working?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: