<?php if ( get_theme_mod( 'prime-business-testimonials-switch-setting', false ) ) : ?>
    <div class="ct-testimonials u-full-width ct-customizer" style="background-image: url( <?php echo esc_url( get_theme_mod( "prime-business-testimonial-bg-setting" ) ); ?> );">

        <div class="ct-color-mask"></div><!-- /.ct-color-mask -->
        <?php
            $prime_business_dots = 'false';
            if ( get_theme_mod( 'prime-business-testimonial-options-setting-0', true ) ) {
                $prime_business_dots = 'true';
            }

            $prime_business_arrows = 'false';
            if ( get_theme_mod( 'prime-business-testimonial-options-setting-1', true ) ) {
                $prime_business_arrows = 'true';
            }

            $prime_business_fade = 'false';
            if ( get_theme_mod( 'prime-business-testimonial-options-setting-2', true ) ) {
                $prime_business_fade = 'true';
            }

            $prime_business_autoplay = 'false';
            if ( get_theme_mod( 'prime-business-testimonial-options-setting-3', true ) ) {
                $prime_business_autoplay = 'true';
            }
        ?>
        <div class="container ct-testimonial-slider" data-slick='{
                            "dots": <?php echo esc_attr( $prime_business_dots ); ?>,
                            "arrows": <?php echo esc_attr( $prime_business_arrows ); ?>,
                            "fade": <?php echo esc_attr( $prime_business_fade ); ?>,
                            "autoplay": <?php echo esc_attr( $prime_business_autoplay ); ?>,
                            "autoplaySpeed": 8000,
                            "pauseOnHover": false,
                            "adaptiveHeight": false
                        }'>
             <?php
                for ( $prime_business_count = 1; $prime_business_count < 7 ; $prime_business_count++ ) :
                    $prime_business_testimonial = get_theme_mod( "prime-business-testimonial-setting-$prime_business_count" );
                    if ( ! empty( $prime_business_testimonial ) ) :
            ?>
            <div class="row vertical-align ct-testimonial-slide">
                <?php $prime_business_cols = 'twelve'; ?>
                <?php if ( has_post_thumbnail( $prime_business_testimonial ) ) : ?>
                <?php $prime_business_cols = 'ten'; ?>
                <div class="two columns ">
                    <div class="slider-rounded-image">
                        <img src="<?php echo esc_url( get_the_post_thumbnail_url( $prime_business_testimonial, 'prime-business-600-1x1' ) ); ?>" alt="<?php echo esc_attr__( 'testimonial author', 'prime-business' ) ?>">
                    </div><!-- /.rounded-image -->
                </div><!-- /.two columns -->
                <?php endif; ?>
                <div class="<?php echo esc_attr( $prime_business_cols ); ?> columns testimonial-contents">
                    <div class="testimonial-content <?php echo esc_attr( "testimonial-content-$prime_business_count" ); ?>"><?php echo wp_kses_post( get_post_field( 'post_content', $prime_business_testimonial ) ); ?></div>
                    <p class="testimonial-by"><?php esc_html_e( '-', 'prime-business' ); ?> <?php echo esc_html( get_the_title( $prime_business_testimonial ) ); ?></p><!-- /.testimonial-by -->
                </div><!-- /.nine columns -->
            </div><!-- /.row -->
            <?php
                endif;
                endfor;
            ?>
        </div><!-- /.container -->
    </div><!-- /.ct-testimonials u-full-width -->
<?php endif; ?>
