Guest User

Untitled

a guest
May 24th, 2019
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : wallstreet Pro
  4. * @file : index-slider.php
  5. * @package : wallstreet-Pro
  6. @author : webriti
  7. * @filesource : wp-content/themes/wallstreet/index-slider_centre.php
  8. */
  9. ?>
  10. <!-- wallstreet Main Slider --->
  11. <?php
  12. $wallstreet_pro_options=theme_data_setup();
  13. $current_options = wp_parse_args( get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options );
  14. $animation= $current_options['animation'];
  15. $animationSpeed=$current_options['animationSpeed'];
  16. $direction=$current_options['slide_direction'];
  17. $slideshowSpeed=$current_options['slideshowSpeed'];
  18. ?>
  19. <script>
  20. jQuery(window).load(function(){
  21. jQuery('.flexslider').flexslider({
  22. animation: "<?php echo $animation; ?>",
  23. animationSpeed: <?php echo $animationSpeed; ?>,
  24. direction: "<?php echo $direction; ?>",
  25. slideshowSpeed: <?php echo $slideshowSpeed; ?>,
  26. pauseOnHover: true,
  27. slideshow: true,
  28. start: function(slider){
  29. jQuery('body').removeClass('loading');
  30. }
  31. });
  32. });
  33. </script>
  34. <!-- /Slider Section -->
  35. <div class="homepage_mycarousel">
  36. <div class="flexslider">
  37. <div class="flex-viewport">
  38. <?php if($current_options['home_slider_enabled'] == true) {
  39.  
  40. $count_posts = wp_count_posts( 'wallstreet_slider')->publish;
  41. $args = array( 'post_type' => 'wallstreet_slider','posts_per_page' =>$count_posts);
  42. $slider = new WP_Query( $args );
  43. if( $slider->have_posts() )
  44. { ?>
  45. <ul class="slides">
  46. <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
  47. <li>
  48. <?php if(has_post_thumbnail()): ?>
  49. <?php $defalt_arg =array('class' => "img-responsive"); ?>
  50. <?php the_post_thumbnail('', $defalt_arg); ?>
  51. <?php endif; ?>
  52. <div class="flex-slider-center">
  53. <div class="slide-text-bg1"><h2><?php the_title(); ?></h2></div>
  54. <?php if(get_post_meta( get_the_ID(),'slider_title', true )){ ?>
  55. <div class="slide-text-bg2"><h1><?php echo get_post_meta( get_the_ID(),'slider_title', true ); ?></h1></div>
  56. <?php }
  57. if(get_post_meta( get_the_ID(),'slider_description', true )) { ?>
  58. <div class="slide-text-bg3"><p><?php echo get_post_meta( get_the_ID(),'slider_description', true ); ?></p></div>
  59. <?php }
  60. if(get_post_meta( get_the_ID(),'slider_button_text', true ))
  61. { ?>
  62. <div class="flex_btn_div">
  63. <a class="flex_btn" href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>" <?php if(get_post_meta( get_the_ID(),'slider_button_target', true )) { echo "target='_blank'"; } ?>>
  64. <?php echo get_post_meta( get_the_ID(),'slider_button_text', true ); ?>
  65. <i class="fa fa-chevron-circle-right"></i>
  66. </a>
  67. </div>
  68. <?php } ?>
  69. </div>
  70. </li>
  71. <?php endwhile; ?>
  72. </ul>
  73. <?php } else { ?>
  74. <ul class="slides">
  75. <?php for($i=1; $i<=2; $i++) { ?>
  76. <li>
  77. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/slider/slide<?php echo $i; ?>.jpg">
  78. <div class="flex-slider-center">
  79. <div class="slide-text-bg1"><h2><?php _e('Clean & Fresh Theme' ,'wallstreet'); ?></h2></div>
  80. <div class="slide-text-bg2"><h1><?php _e('Welcome To ', 'wallstreet'); ?><span><?php _e('Wallstreet', 'wallstreet'); ?></span></h1></div>
  81. <div class="slide-text-bg3"><p><?php _e('The state-of-the-art HTML5 powered flexible layout with lightspeed fast CSS3 transition effects. Works perfect in any modern mobile...','wallstreet'); ?></p></div>
  82. <div class="flex_btn_div">
  83. <a class="flex_btn" href="#"><?php _e('Purchase Now','wallstreet'); ?> <i class="fa fa-chevron-circle-right"></i></a>
  84. </div>
  85. </div>
  86. </li>
  87. <?php } ?>
  88. </ul>
  89. <?php }
  90. } ?>
  91. </div>
  92. </div>
  93. </div>
  94.  
  95. <!-- /wallstreet Main Slider --->
  96. <div class="purchase_main_content">
  97. <div class="container">
  98. <div class="row-fluid purchase_now_content">
  99. <div class="col-md-8">
  100. <h1>Rambo is a clean and fully responsive Template.</h1>
  101. </div>
  102. <div class="col-md-4">
  103. <a class="purchase_now_btn" href="#" target="_blank">Purchase Now</a>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
Add Comment
Please, Sign In to add comment