'news', 'description' => 'Custom Bee News Category Display' ); parent::__construct( 'bee_news_sidebar_widget', 'Bee News Category Sidebar', $widget_options ); } // Create the widget output. public function widget( $args, $instance ) { $title = apply_filters( 'widget_title', $instance[ 'title' ] ); $cat_id = apply_filters( 'widget_title', $instance[ 'cat_id' ] ); $args = array( 'category' => $cat_id, 'post_type' => 'post' , 'numberposts' => 5); $postslist = get_posts( $args ); global $post; echo $args['before_widget'] . $args['before_title'] . $title . $args['after_title']; ?>