/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { echo $args['before_widget']; /********************************************************************************/ ?> <blockquote> <?php $rand_row = get_randomquote(); // This function is in the functions.php file echo '<h5>' . $rand_row['testimonial_title'] . '</h5>'; echo '<span class="quote">' . $rand_row['quote'] . '</span>'; echo '<footer>' . $rand_row['persons_name'] . ' '; echo '<cite title="Source Title">' . $rand_row['location_business'] . '</cite>'; echo '</footer>'; ?> </blockquote> <?php /********************************************************************************/ echo $args['after_widget']; }
} $cnt++; } } ?> <?php $randomquote = get_randomquote(); if (!empty($randomquote)) { ?> <div class="row"> <div class="col-md-5"> <?php $randomquote = get_randomquote(); ?> <h3><?php echo $randomquote['persons_name']; ?> </h3> <h4><?php echo $randomquote['location_business']; ?> </h4> <p><?php echo $randomquote['background_info']; ?> </p> </div>