'featured-posts', 'description' => esc_html__( 'Add Widget to Display Masonry Post.', 'hasium' ) ); parent::__construct( 'hasium_masonry_post',esc_html__( 'HS: Masonry Post', 'hasium' ), $widget_ops, $control_ops ); } function form( $instance ) { $instance = wp_parse_args( (array) $instance, array( 'category' => '', ) ); $category = isset( $instance['category'] ) ? absint( $instance['category'] ) : 0; ?>

'', 'class' => 'widefat', 'show_option_all' => esc_html__('From Recent Post','hasium'), 'name' => esc_attr($this->get_field_name( 'category' )), 'selected' => absint( $category ), ) ); ?>

12, 'post_type' => 'post', 'post_status' => 'publish', 'post__not_in' => get_option( 'sticky_posts' ), ); if ( absint( $category ) > 0 ) { $category_name = get_cat_name( $category ); $category_link = get_category_link( $category ); $slider_args['cat'] = absint( $category ); } $the_query = new WP_Query( $slider_args ); if ($the_query->have_posts()) : $count= 0; ?>
have_posts() ) : $the_query->the_post(); ?>