'widget_rec_posts', 'description' => esc_html__( 'Widget to display recent posts with mini image and date.', 'blog-mantra' ), ); parent::__construct( 'blog-mantra-mini-recent-posts', esc_html__( 'Blog Mantra: Recent Posts Mini', 'blog-mantra' ), $options ); } function widget( $args, $instance ) { $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); $post_nos = ! empty( $instance['post_nos'] ) ? $instance['post_nos'] : 4; echo $args['before_widget']; ?>
absint( $post_nos ), 'no_found_rows' => true, 'post__not_in' => get_option( 'sticky_posts' ), 'ignore_sticky_posts' => true, 'post_status' => 'publish', ); $mini_recent_posts = new WP_Query( $mini_recent_args ); if ( $mini_recent_posts->have_posts() ) : while ( $mini_recent_posts->have_posts() ) : $mini_recent_posts->the_post(); ?>
esc_html__( 'Recent Posts', 'blog-mantra' ), 'post_nos' => 4, ) ); ?>