Tried in different ways but sidebar not working?

function Y_widget_register(){
 register_sidebar(array(
     '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?

Leave a Reply

Your email address will not be published. Required fields are marked *