I pasted my siderbar widget code in widgets.php
file
function right_sidebar_widget() {
register_sidebar( array(
'name' => 'Right Siderbar',
'id' => 'right-siderbar',
'description' => 'Right Sidebar',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'after_setup_theme', 'right_sidebar_widget' );
included widgets.php
file to functions.php
file using
include_once 'includes/widgets.php';
But widgets not working, I got the error
The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions.
Note: I checked, the above code working when in the functions.php and also widgets.php included successfully