defaults = array( 'title' => '', 'content' => 'full', 'posts_per_page' => 1, 'p' => '', 'orderby' => 'rand', 'order' => 'ASC', 'gravatar_size' => 32 ); $widget_ops = array( 'classname' => 'arconix_testimonials_widget', 'description' => __( 'Display client testimonials', 'act' ), ); parent::__construct( 'arconix-testimonials', __( 'Arconix Testimonials', 'act' ), $widget_ops ); } /** * Widget Display. * * Loops through available testimonials as dictated by user and outputs * them to the screen * * @since 1.0.0 * * @param array $args * @param array $instance */ function widget( $args, $instance ) { extract( $args, EXTR_SKIP ); // Merge with defaults $instance = wp_parse_args( $instance, $this->defaults ); // Before widget (defined by themes). echo $before_widget; // Title of widget (before and after defined by themes). if ( !empty( $instance['title'] ) ) echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; $t = new Arconix_Testimonials(); $t-> loop( $instance, true ); // After widget (defined by themes). echo $after_widget; } /** * Update a particular instance. * * @since 1.0.0 * * @param array $new_instance New settings for this instance as input by the user via form() * @param array $old_instance Old settings for this instance * * @return array Settings to save or bool false to cancel saving */ function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags( $new_instance['title'] ); $instance['p'] = strip_tags( $new_instance['p'] ); $instance['posts_per_page'] = strip_tags( $new_instance['posts_per_page'] ); return $new_instance; } /** * Widget form * * @since 1.0.0 * * @param array $instance Current Settings */ function form( $instance ) { /* Merge with defaults */ $instance = wp_parse_args( $instance, $this->defaults ); ?>

Use the Testimonials custom post type to add content to this widget.