Guest User

Untitled

a guest
Sep 7th, 2018
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.20 KB | None | 0 0
  1. <div class="ei-slider-container">
  2. <div id="ei-slider" class="ei-slider">
  3. <?php
  4. $all_posts = wp_count_posts( 'weblizar_slider')->publish;
  5. $args = array( 'post_type' => 'weblizar_slider','posts_per_page' =>$all_posts);
  6. $slider = new WP_Query( $args );
  7. if( $slider->have_posts() )
  8. { ?>
  9. <ul class="ei-slider-large">
  10. <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
  11. <li>
  12. <?php if(has_post_thumbnail()): ?>
  13. <?php $defalt_arg =array('class' => "img-responsive"); ?>
  14. <?php the_post_thumbnail('weblizar_slider', $defalt_arg); ?>
  15. <?php endif; ?>
  16. <!--<img src="<?php //echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slider1.jpg" alt="image05"/> -->
  17. <?php if(the_title() && get_post_meta( get_the_ID(),'slider_description', true )) { ?>
  18. <div class="ei-title">
  19. <h2 class="h2-section-title"><?php echo the_title(); ?></h2>
  20. <h3><?php if(get_post_meta( get_the_ID(),'slider_description', true )) { ?>
  21. <p><?php echo get_post_meta( get_the_ID(),'slider_description', true ); ?></p>
  22. <?php } ?> <br/><br/><br/>
  23. <?php if(get_post_meta( get_the_ID(),'slider_button_text', true ))
  24. { ?>
  25. <a href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>" class="btn btn-default" <?php if(get_post_meta( get_the_ID(),'slider_button_target', true )) { echo "target='_blank'"; } ?>>
  26. <?php echo get_post_meta( get_the_ID(),'slider_button_text', true ); ?></a>
  27. <?php } ?>
  28. </h3>
  29. </div>
  30. <?php } ?>
  31. </li>
  32. <?php endwhile; ?>
  33. </ul>
  34. <ul class="ei-slider-thumbs">
  35. <li class="ei-slider-element">Current</li>
  36. <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
  37. <li><a href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>"><?php echo the_title(); ?></a>
  38. <?php if(has_post_thumbnail()): ?>
  39. <?php $defalt_arg =array('class' => "img-responsive"); ?>
  40. <?php the_post_thumbnail('weblizar_slider', $defalt_arg); ?>
  41. <?php endif; ?>
  42. </li>
  43. <?php endwhile; ?>
  44. </ul><!-- ei-slider-thumbs -->
  45. <?php } else { ?>
  46. <ul class="ei-slider-large">
  47. <li>
  48. <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-1.jpg" alt="image05"/>
  49. <div class="ei-title">
  50. <h2 class="h2-section-title">ABOUT US</h2>
  51. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
  52. nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
  53. <br/><br/><br/>
  54. <h3><a href="#" class="btn btn-default">Read More</a>
  55. </h3>
  56. </div>
  57. </li>
  58. <li>
  59. <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-2.jpg" alt="image03"/>
  60. <div class="ei-title ei-title-right">
  61. <h2 class="h2-section-title">VERY FLEXIBLE</h2>
  62. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
  63. nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
  64. <br/>
  65. <h3><a href="#" class="btn btn-default">Read More</a></h3>
  66. </div>
  67. </li>
  68. <li>
  69. <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-3.jpg" alt="image05"/>
  70. <div class="ei-title ei-title-left">
  71. <h2 class="h2-section-title">WELL DOCUMENTED</h2>
  72. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
  73. nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
  74. <br/>
  75. <h3><a href="#" class="btn btn-default">Read More</a></h3>
  76. </div>
  77. </li>
  78. </ul><!-- ei-slider-large -->
  79. <ul class="ei-slider-thumbs">
  80. <li class="ei-slider-element">Current</li>
  81. <li><a href="#">Slide 1</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-1.jpg" alt="Slide 1" /></li>
  82. <li><a href="#">Slide 2</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-2.jpg" alt="Slide 2" /></li>
  83. <li><a href="#">Slide 3</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-3.jpg" alt="Slide 3" /></li>
  84. </ul><!-- ei-slider-thumbs -->
  85. <?php } ?>
  86.  
  87. </div><!-- ei-slider -->
  88. </div>
Add Comment
Please, Sign In to add comment