Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @Theme Name : Quality Pro
- * @file : index-testimonials.php
- * @package : Quality-Pro
- * @author : Hari Maliya
- * @license : license.txt
- * @filesource : wp-content/themes/quality/index-testimonials.php
- */
- ?>
- <!-- Quality Testimonial Section ---->
- <?php
- $testimonial_options = get_theme_mod('quality_testimonial_content');
- if(empty($testimonial_options))
- {
- $quality_pro_options = get_option('quality_pro_options');
- if(get_option('quality_pro_options')!='' && isset($quality_pro_options['home_testimonial_title'])){
- $count_posts = wp_count_posts( 'quality_testimonial')->publish;
- $args = array( 'post_type' => 'quality_testimonial','posts_per_page' =>$count_posts);
- $testimonial = new WP_Query( $args );
- if( $testimonial->have_posts() )
- {
- while ( $testimonial->have_posts() ) : $testimonial->the_post();
- $pro_testimonial_data_old[] = array(
- 'title' => get_the_title(),
- 'text' => get_post_meta( get_the_ID(), 'description_meta_save', true ),
- 'designation' => get_post_meta( get_the_ID(), 'author_designation_meta_save', true ),
- 'link' => '#',
- 'image_url' => get_the_post_thumbnail_url(),
- 'open_new_tab' => false,
- 'id' => 'customizer_repeater_56d7ea7f40b96',
- );
- endwhile;
- $testimonial_options = json_encode($pro_testimonial_data_old);
- }
- }
- }
- $quality_pro_options=theme_data_setup();
- $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options );
- $testi_slide_type=$current_options['testi_slide_type'];
- $testi_scroll_items=$current_options['testi_scroll_items'];
- $testi_scroll_duration=$current_options['testi_scroll_dura'];
- $testi_timeout_duration=$current_options['testi_timeout_dura'];
- ?>
- <script>
- jQuery(function(){
- jQuery('#qua-testimonial').carouFredSel({
- width: '100%',
- responsive : true,
- auto: { pauseOnHover: 'immediate' },
- circular: true,
- pagination: "#pager2",
- items: {
- visible: {
- min: 1,
- max: 2
- }
- },
- prev: '#prev3',
- next: '#next3',
- directon: 'left',
- scroll : {
- items : <?php echo $testi_scroll_items; ?>,
- duration : <?php echo $testi_scroll_duration; ?>,
- fx:'<?php echo $testi_slide_type; ?>',
- timeoutDuration : <?php echo $testi_timeout_duration; ?>
- },
- });
- });
- </script>
- <div class="qua_testimonial_carusel">
- <div class="container">
- <?php $quality_pro_options=theme_data_setup();
- $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options ); ?>
- <div class="qua_port_title">
- <?php if($current_options['home_testimonial_title']) { ?>
- <h1><?php echo $current_options['home_testimonial_title']; ?></h1>
- <?php }
- if($current_options['home_testimonial_desciption']) { ?>
- <p><?php echo $current_options['home_testimonial_desciption']; ?></p>
- <?php } ?>
- <div class="qua-separator" id=""></div>
- </div>
- <div class="row" id="qua-testimonial">
- <?php
- $testimonial_options = json_decode($testimonial_options);
- if( $testimonial_options!='' )
- {
- foreach($testimonial_options as $testimonial_iteam){
- $testimonial_title = ! empty( $testimonial_iteam->title ) ? apply_filters( 'quality_translate_single_string', $testimonial_iteam->title, 'Testimonial section' ) : '';
- $text_desc = ! empty( $testimonial_iteam->text ) ? apply_filters( 'quality_translate_single_string', $testimonial_iteam->text, 'Testimonial section' ) : '';
- $text_link = $testimonial_iteam->link;
- $open_new_tab = $testimonial_iteam->open_new_tab;
- $designation = ! empty( $testimonial_iteam->designation ) ? apply_filters( 'quality_translate_single_string', $testimonial_iteam->designation, 'Testimonial section' ) : '';
- ?>
- <div class="col-md-6 col-sm-12 pull-left">
- <div class="media">
- <div class="pull-left qua_testimonianl_sec">
- <?php if($testimonial_iteam->image_url !=''): ?>
- <?php if($text_link!=''){?>
- <a href="<?php echo $text_link; ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>>
- <?php }?>
- <img class="img-responsive" alt="Author" src="<?php echo $testimonial_iteam->image_url; ?>" draggable="false">
- <?php if($text_link!=''){?>
- </a>
- <?php }?>
- <?php endif; ?>
- <p>
- <?php if($text_link!=''){?>
- <a href="<?php echo $text_link; ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>><?php }?>
- <?php echo $testimonial_title; ?>
- <?php if($text_link!=''){?></a><?php }?>
- </p>
- <i class="fa fa-caret-right"></i>
- </div>
- <div class="media-body">
- <?php if($text_desc!=''){ ?>
- <p class="qua_testimonianl_content"><?php echo $text_desc; ?></p>
- <?php } ?>
- <?php if($designation !='') {?>
- <a href="<?php echo $text_link; ?>" <?php if($open_new_tab == 'yes'){ echo 'target="_blank"';}?>> <h3 class="qua_testimonianl_desig"><?php echo $designation; ?></h3></a>
- <?php } ?>
- </div>
- </div>
- </div>
- <?php
- } }else {
- $name =array(__('Lerry Beth','quality'), __('Anna Kathleen','quality'), __('Laura Michelle','quality'), __('Angela Mcarthy','quality'));
- $desc =array(__('Interior Designer','quality'), __('DEVELOPER','quality'), __('Sr Therapist','quality'), __('Architect','quality'));
- for($i=0; $i<4; $i++) { ?>
- <div class="col-md-6 col-sm-12 pull-left">
- <div class="media">
- <div class="pull-left qua_testimonianl_sec">
- <a href="#"><img class="media-object" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/testi-img2.png"></a>
- <p><a href="#"><?php echo $name[$i]; ?></a></p>
- <i class="fa fa-caret-right"></i>
- </div>
- <div class="media-body">
- <p class="qua_testimonianl_content"><?php _e('This is where you could add a short bio about the owner or staff of your establishment This is where you could add a short Testimonial about the owner or staff of your establishment quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.','quality'); ?></p>
- <h3 class="qua_testimonianl_desig"><?php echo $desc[$i]; ?></h3>
- </div>
- </div>
- </div>
- <?php }
- }?>
- </div>
- <div class="row">
- <div id="pager2" class="pager testi-pager"></div>
- </div>
- </div>
- </div>
- <!-- /Quality Testimonial Section ---->
Add Comment
Please, Sign In to add comment