esc_html__( 'Latest posts widget.', 'bianco' ), ) ); } function widget( $args, $instance ) { echo $args['before_widget']; $blog_widget_title = esc_attr( $instance['blog_widget_title'] ); if ( !empty( $instance['blog_widget_title'] ) ) { echo '
'; } if( $instance) { $blog_widget_title = esc_attr( $instance['blog_widget_title'] ); $blog_widget_category = esc_attr( $instance['blog_widget_category'] ); $blog_widget_exclude = esc_attr( $instance['blog_widget_exclude'] ); $blog_widget_offset = esc_attr( $instance['blog_widget_offset'] ); $blog_widget_post_count = esc_attr( $instance['blog_widget_post_count'] ); } /*------------- Exclude Start -------------*/ if( !empty( $blog_widget_exclude ) ) : $blog_widget_exclude = $blog_widget_exclude; $blog_widget_exclude = explode( ',', $blog_widget_exclude ); else: $blog_widget_exclude = ""; endif; /*------------- Exclude End -------------*/ ?> $blog_widget_post_count, 'post_status' => 'publish', 'post__not_in' => $blog_widget_exclude, 'offset' => $blog_widget_offset, 'ignore_sticky_posts' => true, 'post_type' => 'post', 'cat' => $blog_widget_category ); $wp_query = new WP_Query($args_latest_posts); if( $wp_query->have_posts() ) { echo ''; } wp_reset_postdata(); ?>