esc_html__('Aster Recent posts widget to display recent posts', 'aster'),) // Args ); } /*------------------------------------------------------- * Front-end display of widget *-------------------------------------------------------*/ public function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title'] ); $count = $instance['count']; echo $before_widget; $output = ''; if ( $title ) echo $before_title . $title . $after_title; global $post; $args = array( 'posts_per_page' => $count, 'order' => 'DESC' ); $posts = get_posts( $args ); if(count($posts)>0){ $output .='