'mh_newsdesk_lite_posts_large', 'description' => __('Display post with large image on front page for use in "Home 1" or "Home 4" widget areas.', 'mh-newsdesk-lite')); $this->WP_Widget('mh_newsdesk_lite_posts_large', __('MH Posts Large (lite)', 'mh-newsdesk-lite'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base); $category = isset($instance['category']) ? $instance['category'] : ''; $offset = empty($instance['offset']) ? '' : $instance['offset']; $sticky = isset($instance['sticky']) ? $instance['sticky'] : 1; if ($category) { $cat_url = get_category_link($category); $before_title = $before_title . ''; $after_title = '' . $after_title; } echo $before_widget; if (!empty($title)) { echo $before_title . esc_attr($title) . $after_title; } $args = array('posts_per_page' => '1', 'offset' => $offset, 'cat' => $category, 'ignore_sticky_posts' => $sticky); $widget_loop = new WP_Query($args); ?>
have_posts()) : $widget_loop->the_post(); get_template_part('content', 'lead'); echo '
' . "\n"; endwhile; wp_reset_postdata(); ?>
'', 'category' => '', 'offset' => '0', 'sticky' => 1); $instance = wp_parse_args((array) $instance, $defaults); ?>

/>