'widget_blog_grid', 'description' => esc_html__( 'Display single blog column in home page', 'businessdeal') ); $control_ops = array('width' => 200, 'height' => 250); parent::__construct( false, $name=esc_html__('T-Spiral: Blog Grid Category Posts','businessdeal'), $widget_ops, $control_ops ); } /** * Back-end widget form. * * @see WP_Widget::form() * */ public function form( $instance ) { $posts_title = ! empty( $instance['posts_title'] ) ? esc_attr( $instance['posts_title'] ) : ''; $latest_posts = ! empty( $instance['latest_posts'] ) ? esc_attr( $instance['latest_posts'] ) : 'latest'; $category = ! empty( $instance['category'] ) ? esc_attr( $instance['category'] ) : 'category'; ?>

id="get_field_id( 'latest_posts' ); ?>" name="get_field_name( 'latest_posts' )); ?>" value="latest"/>
id="get_field_id( 'latest_posts' )); ?>" name="get_field_name( 'latest_posts' )); ?>" value="category"/>

esc_html__('-- Select -- ','businessdeal'),'name' => esc_attr($this->get_field_name( 'category' )), 'selected' => esc_attr($category) ) ); ?>

4, 'post_type' => 'post', 'ignore_sticky_posts' => true ) ); } else { $get_posts = new WP_Query( array( 'posts_per_page' => 4, 'post_type' => 'post', 'category__in' => absint($category) ) ); } while( $get_posts-> have_posts() ) : $get_posts->the_post(); ?>

"%s"', array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); } else { the_excerpt(); } ?>
'; } }