<?php 
//add featured image to our theme

function blog_theme_setup(){
    add_theme_support('post-thumbnails');
    //add menu 
    register_nav_menus(array(
        'primary' => 'Main Menu'
    ));
}
add_action('after_setup_theme','blog_theme_setup');

//set body length

function set_body_length(){
    return 100;
}
add_filter('excerpt_length','set_body_length');

//add sidebar wiget

function add_sidebar_widget($id){
    register_sidebar(
        array(
            'name' => 'Sidebar',
            'id' => 'sidebar',
            'before_widget' => '<div class="sidebar-widgets">',
            'after_widget' => '</div>',
            'before_title' => '<h3>',
            'after_title' => '</h3>'
        )
    );
}
add_action('widgets_init','add_sidebar_widget');