Guest User

Untitled

a guest
Feb 3rd, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. <!-- Carousel -->
  2. <?php $wl_theme_options = get_option('enigma_options_pro');
  3. $side_interval = $wl_theme_options['side_interval']; ?>
  4. <div class="row enigma-slider" id="enigma_slider">
  5. <div class="swiper-container home-slider">
  6. <?php $all_posts = wp_count_posts('weblizar_slider')->publish;
  7. $args = array( 'post_type' => 'weblizar_slider','posts_per_page' =>$all_posts);
  8. $slider = new WP_Query( $args );
  9. if( $slider->have_posts() ) { ?>
  10. <div class="swiper-wrapper ">
  11. <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
  12. <div class="swiper-slide">
  13. <?php if(has_post_thumbnail()) {
  14. $defalt_arg =array('class' => "img-responsive");
  15. the_post_thumbnail('home_slider_1_thumb', $defalt_arg);
  16. } else { $slider_youtube_url = get_post_meta( get_the_ID(), 'slider_youtube_url', true ); ?>
  17. <iframe id="slider_youtube_iframe2" src="<?php echo $slider_youtube_url; ?>?autoplay=1&amp;rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe></p>
  18. <?php } ?>
  19. <div class="overlay"></div>
  20. <div class="carousel-caption">
  21. <div class="container">
  22. <div class="row slider-text">
  23. <?php if(the_title('','','')) { ?>
  24. <h1 class="animation animated-item-1" data-wow-iteration="5s" data-wow-duration="3s" data-wow-delay="0s" data-wow-timing-function="linear"><?php the_title(); ?></h1>
  25. <?php }
  26. if(get_post_meta( get_the_ID(),'slider_desciption', true )) { ?>
  27. <p class="animation animated-item-2"><?php echo get_post_meta( get_the_ID(),'slider_desciption', true ); ?></p>
  28. <?php }
  29. if(get_post_meta( get_the_ID(),'slider_button_text', true )) { ?>
  30. <a href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>" class="btn s_link animation animated-item-3" <?php if(get_post_meta( get_the_ID(),'slider_button_target', true )) { echo "target='_blank'"; }?> ><?php echo get_post_meta( get_the_ID(),'slider_button_text', true ); ?></a>
  31. <?php } ?>
  32. </div>
  33. </div>
  34. </div>
  35. </div><?php endwhile; ?>
  36. </div>
  37. <?php } if($all_posts >= "2") { ?>
  38. <div class="swiper-button-prev slider-prev"><i class="fa fa-angle-left"></i></div>
  39. <div class="swiper-button-next slider-next"><i class="fa fa-angle-right"></i></div>
  40. <?php } ?>
  41. </div>
  42. </div>
  43. <!-- / Slider-->
Add Comment
Please, Sign In to add comment