akhlesh_nagar

Untitled

Sep 6th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 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. <a class="" 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'"; } ?>>
  51. <?php the_post_thumbnail('', $defalt_arg); ?>
  52. </a>
  53. <?php endif; ?>
  54.  
  55. </li>
  56. <?php endwhile; ?>
  57. </ul>
  58. <?php } else { ?>
  59. <ul class="slides">
  60. <?php for($i=1; $i<=2; $i++) { ?>
  61. <li>
  62. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/slider/slide<?php echo $i; ?>.jpg">
  63. <div class="flex-slider-center">
  64. <div class="slide-text-bg1"><h2><?php _e('Clean & Fresh Theme' ,'wallstreet'); ?></h2></div>
  65. <div class="slide-text-bg2"><h1><?php _e('Welcome To ', 'wallstreet'); ?><span><?php _e('Wallstreet', 'wallstreet'); ?></span></h1></div>
  66. <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>
  67. <div class="flex_btn_div">
  68. <a class="flex_btn" href="#"><?php _e('Purchase Now','wallstreet'); ?> <i class="fa fa-chevron-circle-right"></i></a>
  69. </div>
  70. </div>
  71. </li>
  72. <?php } ?>
  73. </ul>
  74. <?php }
  75. } ?>
  76. </div>
  77. </div>
  78. </div>
  79.  
  80. <!-- /wallstreet Main Slider --->
Add Comment
Please, Sign In to add comment