Guest User

Untitled

a guest
Oct 16th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : Wallstreet Pro
  4. * @file : index-testimonials.php
  5. * @package : wallstreet_pro
  6. @author : webriti
  7. * @filesource : wp-content/themes/wallstreet/index-testimonials.php
  8. */
  9. ?>
  10. <?php
  11. $wallstreet_pro_options=theme_data_setup();
  12. $current_options = wp_parse_args( get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options );
  13. $testi_slide_type=$current_options['testi_slide_type'];
  14. $testi_scroll_items=$current_options['testi_scroll_items'];
  15. $testi_scroll_duration=$current_options['testi_scroll_dura'];
  16. $testi_timeout_duration=$current_options['testi_timeout_dura'];
  17. ?>
  18. <script>
  19. jQuery(function() {
  20. jQuery('#testimonial-scroll').carouFredSel({
  21. width: '100%',
  22. responsive : true,
  23. circular: true,
  24. pagination: "#pager2",
  25. items: {
  26. height : 'variable',
  27. visible: {
  28. min: 1,
  29. max: 2
  30. }
  31. },
  32. prev: '#prev3',
  33. next: '#next3',
  34. directon: 'left',
  35.  
  36. auto: true,
  37. scroll : {
  38. items : <?php echo $testi_scroll_items; ?>,
  39. duration : <?php echo $testi_scroll_duration; ?>,
  40. fx:'<?php echo $testi_slide_type; ?>',
  41. timeoutDuration : <?php echo $testi_timeout_duration; ?>,
  42. pauseOnHover : true,
  43. },
  44.  
  45. }).trigger('resize');
  46.  
  47. });
  48. </script>
  49. <!-- Testimonial Section -->
  50. <div class="testimonial-section" style="background: url('<?php echo $current_options['testi_background']; ?>'); background-size:cover;">
  51. <div class="overlay">
  52. <div class="container">
  53. <div class="row" id="testimonial-scroll">
  54. <?php
  55. $count_posts = wp_count_posts( 'wallstreet_testi')->publish;
  56. $args = array( 'post_type' => 'wallstreet_testi','posts_per_page' =>$count_posts);
  57.  
  58. $testimonial = new WP_Query( $args );
  59. if( $testimonial->have_posts() )
  60. { while ( $testimonial->have_posts() ) { $testimonial->the_post();
  61.  
  62. $testimonial_description_text =sanitize_text_field( get_post_meta( get_the_ID(), 'testimonial_description_text', true ));
  63. ?>
  64. <div class="col-md-12 testimonial-area pull-left">
  65. <?php
  66. $defalt_arg =array('class' => "img-circle img-responsive");
  67. if(has_post_thumbnail()){ ?>
  68. <div><a href="<?php echo (the_field('link'));?>" target="_blank">
  69. <?php the_post_thumbnail('', $defalt_arg); ?></a></div>
  70. <?php } ?>
  71. <p><?php if(!empty($testimonial_description_text)){ echo $testimonial_description_text; } ?> </p>
  72. <h2><i></i><?php the_title();?><i></i></h2>
  73. </div>
  74. <?php } } else {
  75. for($i=1 ; $i<=3 ; $i++)
  76. {
  77. ?>
  78. <div class="col-md-12 testimonial-area pull-left">
  79. <div><img class="img-circle img-responsive" alt="Wallstreet Image" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/testi1.jpg"></div>
  80. <p><?php echo 'Juis voluptatem sequi nesciunt. Neque porro quisquam est, qui don numquam eius modi ssim hen urlus mattis dignissim dapibctumst.'; ?></p>
  81. <h2><i></i> <?php echo 'David Warner'; ?><i></i></h2>
  82. </div>
  83. <?php } } ?>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <!-- /Testimonial Section -->
Add Comment
Please, Sign In to add comment