__( 'Displays posts by three blocks per row.', 'awaken' ), ) // Args ); } /** * Back-end widget form. * * @see WP_Widget::form() * * @param array $instance Previously saved values from database. */ public function form( $instance ) { //print_r($instance); $defaults = array( 'title' => __( 'Latest Posts', 'awaken' ), 'category' => '', 'number_posts' => 3, 'sticky_posts' => true, 'offset' => 0 ); $instance = wp_parse_args( (array) $instance, $defaults ); $number_posts = isset( $instance['number_posts'] ) ? absint( $instance['number_posts'] ) : 3; $offset = isset( $instance['offset'] ) ? absint( $instance['offset'] ) : 0; ?>

$this->get_field_name('category'), 'selected' => $instance['category'], 'show_option_all' => 'Show all posts' ) ); ?>

class="checkbox" id="get_field_id('sticky_posts'); ?>" name="get_field_name('sticky_posts'); ?>" />

$category, 'posts_per_page' => $number_posts, 'post_status' => 'publish', 'ignore_sticky_posts' => $sticky_posts, 'offset' => $offset ) ); echo $before_widget; if ( ! empty( $title ) ) { echo $before_title . $title . $after_title; } ?>
have_posts() ) : while ( $latest_posts -> have_posts() ) : $latest_posts -> the_post(); ?>
'; } ?>