Create Custom Widget in Wordpress

Custom Widget in Wordpress, Copy this Code And Past in Function.php File Thane create admin side widget

register_sidebar( array(
    'name' => __( 'Your Widget Name', 'twentytwelve' ),  //set your widget name
    'id' => 'widget id',
    'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => '</aside>',
    'before_title' => '<h3 class="Your Widget Title">',
    'after_title' => '</h3>',
) );