'homepage-default-posts', 'description' => __('Displays the latest posts from the selected category in the default manner.', 'restimpo') ); $control_ops = array('width' => 200, 'height' => 400); $this->WP_Widget('restimpodefault', __('RestImpo Posts-Default', 'restimpo'), $widget_ops, $control_ops); } function form($instance) { // outputs the options form on admin if ( $instance ) { $title = esc_attr( $instance[ 'title' ] ); } else { $title = __( '', 'restimpo' ); } if ( $instance ) { $category = esc_attr( $instance[ 'category' ] ); } else { $category = __( '', 'restimpo' ); } if ( $instance ) { $numberposts = esc_attr( $instance[ 'numberposts' ] ); } else { $numberposts = __( '5', 'restimpo' ); } ?>

$this->get_field_name('category'), 'id' => $this->get_field_id('category'), 'class' => 'widefat', 'selected' => $category, 'show_option_none' => '- not selected -' ) ); ?>

$category, 'showposts' => $numberposts, 'post_type' => 'post', 'post_status' => 'publish' ); $my_query = new WP_Query( $args1 ); ?>

have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?>