Guest User

Untitled

a guest
Nov 23rd, 2017
32
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-- Testimonial Section -->
  2. <?php
  3. $testimonial_options = get_theme_mod('elitepress_testimonial_content');
  4. if (empty($testimonial_options)) {
  5. $pro_testimonial_data = get_option('elitepress_lite_options');
  6. $pro_testimonial_title = (!isset($pro_testimonial_data['testimonial_title']) ) ? 'no' : $pro_testimonial_data['testimonial_title'];
  7. if ($pro_testimonial_title != 'no') {
  8.  
  9. $count_posts = wp_count_posts('webriti_testimonial')->publish;
  10. $args = array('post_type' => 'webriti_testimonial', 'posts_per_page' => $count_posts);
  11. $testimonial = new WP_Query($args);
  12.  
  13. if ($testimonial->have_posts()) {
  14. while ($testimonial->have_posts()) : $testimonial->the_post();
  15. $pro_testimonial_data_old[] = array(
  16. 'title' => get_the_title(),
  17. 'text' => get_post_meta(get_the_ID(), 'testimonial_role_description', true),
  18. 'designation' => get_post_meta(get_the_ID(), 'testimonial_designation', true),
  19. 'link' => '#',
  20. 'image_url' => get_the_post_thumbnail_url(),
  21. 'open_new_tab' => false,
  22. 'id' => 'customizer_repeater_56d7ea7f40b96',
  23. );
  24.  
  25. endwhile;
  26. $testimonial_options = json_encode($pro_testimonial_data_old);
  27. }
  28. }
  29. }
  30. $elitepress_lite_options = theme_data_setup();
  31. $current_options = wp_parse_args(get_option('elitepress_lite_options', array()), $elitepress_lite_options);
  32. $settings = array();
  33. $settings = array('testi_slide_type' => $current_options['testi_slide_type'],);
  34. wp_register_script('elitepress-testimonial', get_template_directory_uri() . '/js/front-page/testimonial.js', array('jquery'));
  35. wp_localize_script('elitepress-testimonial', 'testimonial_settings', $current_options);
  36. wp_enqueue_script('elitepress-testimonial');
  37. $imgURL = $current_options['testimonial_background'];
  38. if ($imgURL != '') {
  39. ?>
  40. <section class="testimonial-section" style="background-image:url('<?php echo $imgURL; ?>'); background-repeat: no-repeat; background-position: top left; background-attachment: fixed;">
  41. <?php } else { ?>
  42. <section class="testimonial-section">
  43. <?php } ?>
  44. <div class="overlay">
  45. <div class="container">
  46. <!-- Section Title -->
  47. <div class="row">
  48. <div class="col-md-12 col-sm-12">
  49. <div class="section-header">
  50. <?php if ($current_options['testimonial_title']) { ?>
  51. <h3 class="section-title"><?php echo esc_html($current_options['testimonial_title']); ?></h3>
  52. <?php }
  53. if ($current_options['testimonial_description']) {
  54. ?>
  55. <p class="section-subtitle text-color"><?php echo esc_html($current_options['testimonial_description']); ?></p>
  56. <?php } ?>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- /Section Title -->
  61. <!-- Testimonial -->
  62. <div id="testimonial" class="flexslider col-md-12">
  63.  
  64. <?php
  65. $myshortcode = '[mycode]';
  66. echo do_shortcode($myshortcode);
  67. ?>
  68.  
  69. </div>
  70. <!-- Testimonial -->
  71. </div>
  72. </div>
  73. </section>
  74. </section>
  75. <!-- /End of Testimonial Section -->
  76. <div class="clearfix"></div>
RAW Paste Data