Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function personify_pro_render_testimonial_section( $content_details = array() ) {
- $options = personify_pro_get_theme_options();
- if ( empty( $content_details ) ) {
- return;
- } ?>
- <div id="client-testimonial" class="relative page-section">
- <div class="wrapper">
- <?php if ( ! empty( $options['testimonial_title'] ) ) : ?>
- <div class="section-header align-center">
- <?php
- $title = explode( ' ', $options['testimonial_title'] );
- $first_word = $title[0];
- $title = implode( ' ', array_slice( $title, 1 ) );
- ?>
- <h2 class="section-title"><span><?php echo esc_html( $first_word ); ?></span> <?php echo esc_html( $title ); ?></h2>
- </div><!-- .section-header -->
- <?php endif; ?>
- <div class="section-content">
- <div class="testimonial-slider <?php echo ( count( $content_details ) === 1 ) ? 'one-item' : ''; ?>" data-slick='{"slidesToShow": <?php echo ( count( $content_details ) === 1 ) ? 1 : 2; ?>, "slidesToScroll": 1, "infinite": true, "speed": 5000, "dots": false, "arrows":true, "autoplay": true, "fade": false, "draggable": true }'>
- <?php foreach ( $content_details as $content ) : ?>
- <div class="slick-item">
- <div class="client-wrapper">
- <img src="<?php echo esc_url( get_template_directory_uri() . '/assets/uploads/quote-gray.png' ); ?>" class="quote-icon" alt="<?php echo esc_attr( $content['title'] ); ?>">
- <?php if ( ! empty( $content['excerpt'] ) ) : ?>
- <div class="entry-content"><?php echo wp_kses_post( $content['excerpt'] ); ?></div><!-- .entry-content -->
- <?php endif;
- if ( ! empty( $content['title'] ) ) : ?>
- <header class="entry-header">
- <h2 class="entry-title">
- <?php if ( ! empty( $content['url'] ) ) : ?>
- <a href="<?php echo esc_url( $content['url'] ); ?>"><?php echo esc_html( $content['title'] ); ?></a>
- <?php else :
- echo esc_html( $content['title'] );
- endif; ?>
- </h2>
- </header>
- <?php endif;
- if ( ! empty( $content['sub_title'] ) ) : ?>
- <div class="client-meta">
- <span class="designation"><?php echo esc_html( $content['sub_title'] ); ?></span>
- </div><!-- .client-meta -->
- <?php endif;
- if ( ! empty( $content['image'] ) ) : ?>
- <div class="featured-image">
- <img src="<?php echo esc_url( $content['image'] ); ?>" alt="<?php echo esc_attr( $content['title'] ); ?>">
- </div><!-- .featured-image -->
- <?php endif; ?>
- </div><!-- .client-wrapper -->
- </div><!-- .slick-item -->
- <?php endforeach; ?>
- </div><!-- .testimonial-slider -->
- </div><!-- .section-content -->
- </div><!-- .wrapper -->
- </div><!-- #client-testimonial -->
- <?php }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement