'bearded-posts-widget', 'description' => __('Show Latest Blog Posts. Best use in homepage widget.', 'bearded') ); $control_ops = array(); $this->WP_Widget('bearded-posts', __('Bearded Latest Posts', 'bearded'), $widget_ops, $control_ops); } function widget( $args, $instance ) { extract($args); extract($instance); /* Display widget ---------------------------------------------------------------*/ echo $before_widget; ?>
$post_type, 'posts_per_page' => 4, 'ignore_sticky_posts' => true, ); $loop = new WP_Query( $args ); if( $loop->have_posts() ) : ?>
have_posts() ) : $loop->the_post(); ?>
'home-thumbnail' ) ); } ?>
', ''); ?>
'Latest From The Blog', 'type' => 'post' ); $instance = wp_parse_args( (array) $instance, $defaults ); /* Build our form ---------------------------------------------------------------*/ ?>