Add the below code on widgets.php below the function function colormag_widgets_init() line number 14
register_sidebar( array(
'name' => __( 'Example ', 'colormag' ),
'id' => 'colormag_example',
'description' => __( 'Shows widgets at Example.', 'colormag' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s clearfix">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title"><span>',
'after_title' => '</span></h3>'
) );
This will register the widget area.
Now to call this widget on front page. Add the below code on front-page.php
if( is_active_sidebar( 'colormag_example' ) ) {
if ( !dynamic_sidebar( 'colormag_example' ) ):
endif;
}
below the line number 40 of front-page.php.
If not work, please feel free to ask. While adding code, do it carefully.
Note: Child theme is recommended to customize theme.
I may be missing something, but I am unable to find Widgets.php, it’s not listed under templates in the Editor.
Please access this file through FTP. Theme customization is not recommended from editor. I already mentioned you about Child theme. No all file can access through editor.
Thanks