__( 'Latest Post Widget', 'spasalon' ), ) // Args ); } public function widget( $args , $instance ) { echo $args['before_widget']; if($instance['title']){ echo $args['before_title'] . $instance['title'] . $args['after_title']; } $loop = new WP_Query(array( 'post_type' => 'post', 'showposts' => $instance['post_show'] )); if( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?>