__( 'Display your recent posts, with a Thumbnail.', 'klopp' ), ) // Args ); } public function widget( $args, $instance ) { if (isset($instance['title'])) : $title = apply_filters( 'widget_title', $instance['title'] ); $no_of_posts = apply_filters( 'no_of_posts', $instance['no_of_posts'] ); else : $title = __('Latest Posts','klopp'); $no_of_posts = 5; endif; echo $args['before_widget']; if ( ! empty( $title ) ) echo $args['before_title'] . $title . $args['after_title']; // WP_Query arguments $qa = array ( 'post_type' => 'post', 'posts_per_page' => $no_of_posts, 'offset' => 0, 'ignore_sticky_posts' => 1 ); // The Query $recent_articles = new WP_Query( $qa ); if($recent_articles->have_posts()) : ?>