'cafe_restaurant_posts_carousel', 'description' => __( 'Display Posts in Carousel.', 'cafe-restaurant' ), 'customize_selective_refresh' => false, ); parent::__construct( 'cafe_restaurant_posts_carousel', __( 'Recent Posts Carousel', 'cafe-restaurant' ), $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 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); $dinprodis = ! empty( $instance['dinprodis'] ) ? $instance['dinprodis'] : '5'; echo $args['before_widget']; if( ! empty( $title ) ) { echo $args['before_title'] . esc_html( $title ) . $args['after_title']; } ?>