'blogostrap_class_last_post', 'description' => 'Display last post.', ); parent::__construct( 'blogostrap_last_post', 'Blogostrap Last Post', $widget_ops ); } /** * Outputs the content of the widget * * @param array $args * @param array $instance */ public function widget( $args, $instance ) { // outputs the content of the widget echo $args['before_widget']; if ( ! empty( $instance['blogostrap_title_last_post'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['blogostrap_title_last_post'] ) . $args['after_title']; } ?> 'post', 'posts_per_page' => '3', 'ignore_sticky_posts' => '1', 'orderby' => 'date', 'order' => 'DESC' ); $query = new WP_Query( $blogostrap_args ); while ( $query->have_posts() ) : $query->the_post(); $id = get_the_ID(); ?>

" "

'.get_the_author().''; ?>