Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Testimonial Section -->
- <?php
- $testimonial_options = get_theme_mod('elitepress_testimonial_content');
- if (empty($testimonial_options)) {
- $pro_testimonial_data = get_option('elitepress_lite_options');
- $pro_testimonial_title = (!isset($pro_testimonial_data['testimonial_title']) ) ? 'no' : $pro_testimonial_data['testimonial_title'];
- if ($pro_testimonial_title != 'no') {
- $count_posts = wp_count_posts('webriti_testimonial')->publish;
- $args = array('post_type' => 'webriti_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(), 'testimonial_role_description', true),
- 'designation' => get_post_meta(get_the_ID(), 'testimonial_designation', 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);
- }
- }
- }
- $elitepress_lite_options = theme_data_setup();
- $current_options = wp_parse_args(get_option('elitepress_lite_options', array()), $elitepress_lite_options);
- $settings = array();
- $settings = array('testi_slide_type' => $current_options['testi_slide_type'],);
- wp_register_script('elitepress-testimonial', get_template_directory_uri() . '/js/front-page/testimonial.js', array('jquery'));
- wp_localize_script('elitepress-testimonial', 'testimonial_settings', $current_options);
- wp_enqueue_script('elitepress-testimonial');
- $imgURL = $current_options['testimonial_background'];
- if ($imgURL != '') {
- ?>
- <section class="testimonial-section" style="background-image:url('<?php echo $imgURL; ?>'); background-repeat: no-repeat; background-position: top left; background-attachment: fixed;">
- <?php } else { ?>
- <section class="testimonial-section">
- <?php } ?>
- <div class="overlay">
- <div class="container">
- <!-- Section Title -->
- <div class="row">
- <div class="col-md-12 col-sm-12">
- <div class="section-header">
- <?php if ($current_options['testimonial_title']) { ?>
- <h3 class="section-title"><?php echo esc_html($current_options['testimonial_title']); ?></h3>
- <?php }
- if ($current_options['testimonial_description']) {
- ?>
- <p class="section-subtitle text-color"><?php echo esc_html($current_options['testimonial_description']); ?></p>
- <?php } ?>
- </div>
- </div>
- </div>
- <!-- /Section Title -->
- <!-- Testimonial -->
- <div id="testimonial" class="flexslider col-md-12">
- <?php
- $myshortcode = '[mycode]';
- echo do_shortcode($myshortcode);
- ?>
- </div>
- <!-- Testimonial -->
- </div>
- </div>
- </section>
- </section>
- <!-- /End of Testimonial Section -->
- <div class="clearfix"></div>
Add Comment
Please, Sign In to add comment