Guest User

Untitled

a guest
Jul 2nd, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. <!-- Gallery Start -->
  2. <?php $health_data= health_care_get_options(); ?>
  3. <span class="anchor" id="gallery-section"></span>
  4. <div class="space gallerys">
  5. <?php if($health_data['gallery_heading']!=''){ ?>
  6. <h1 class="color"><?php esc_attr_e($health_data['gallery_heading'],'weblizar'); ?></h1>
  7. <?php if($health_data['gallery_icon']!=''){ ?>
  8. <div class="ln2 color"></div>
  9. <span class="<?php echo $health_data['gallery_icon']; ?> color heart"></span>
  10. <div class="ln3 color"></div>
  11. <?php } ?>
  12. <?php } ?>
  13. <?php if($health_data['gallery_desc']!=''){ ?>
  14. <p class="desc"><?php esc_attr_e($health_data['gallery_desc'],'weblizar'); ?></p>
  15. <?php } ?>
  16. <div class="hc_homegallery">
  17. <div id="home-gallery" class="swiper-wrapper gallery">
  18. <?php
  19. $args = array( 'post_type' => 'hc_portfolios', 'post_status'=>'publish', 'posts_per_page' => $health_data['gallery_count']);
  20. $gallery = new WP_Query( $args );
  21. if($gallery->have_posts()){
  22. while($gallery->have_posts()):
  23. $gallery->the_post(); ?>
  24. <?php if(has_post_thumbnail()): ?>
  25. <div class="swiper-slide wow zoomIn">
  26. <?php $defalt_arg =array('class'=>"img-responsive home_porfolio_thumb");
  27. the_post_thumbnail('home_porfolio_thumb',$defalt_arg); ?>
  28. <div class="overlay">
  29. <h3><a class="port-title" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
  30. <div class="ln"></div>
  31. <div class="<?php echo sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_icon', true )); ?> hrt"></div>
  32. <h5><?php $portfolio_categories_list = get_the_terms( get_the_ID(), 'hc_portfolio_categories' );
  33. if($portfolio_categories_list){
  34. $totalcat= count($portfolio_categories_list);
  35. $i=1;
  36. foreach($portfolio_categories_list as $list)
  37. { echo $list->name;
  38. if($i <$totalcat){ echo ", ";}
  39. $i++;
  40. }
  41. } ?></h5>
  42. <a class="home-port" href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>"><span class="fa fa-search"></span></a>
  43. <a href="<?php the_permalink(); ?>"><span class="fa fa-chain"></span></a>
  44. </div>
  45. </div>
  46. <?php endif;
  47. endwhile;
  48. }else{ for($i=1; $i<=8; $i++){ ?>
  49. <div class="swiper-slide wow zoomIn">
  50. <img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/portfolio/<?php echo $i; ?>.jpg" alt="Owl Image" >
  51. <div class="overlay">
  52. <h3>Lorem Ipsum Dolor</h3>
  53. <div class="ln"></div>
  54. <div class="fa fa-heart hrt"></div>
  55. <h5>Lorem Ipsum Dolor</h5>
  56. <a class="home-port" href="<?php echo get_template_directory_uri(); ?>/images/portfolio/<?php echo $i; ?>.jpg"><span class="fa fa-search"></span></a>
  57. <a href=""><span class="fa fa-chain"></span></a>
  58. </div>
  59. </div>
  60. <?php } } ?>
  61. </div>
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. jQuery(document).ready(function() {
  66. var swiper = new Swiper('.hc_homegallery', {
  67. slidesPerView: <?php echo $health_data['gallery_column']; ?>,
  68. paginationClickable: true,
  69. spaceBetween: 0,
  70. autoplay: true,
  71. speed: 3000,
  72. breakpoints: {
  73. 1024: {
  74. slidesPerView: <?php echo $health_data['gallery_column']; ?>,
  75. spaceBetween: 0
  76. },
  77. 768: {
  78. slidesPerView: 3,
  79. spaceBetween: 0
  80. },
  81. 640: {
  82. slidesPerView: 2,
  83. spaceBetween: 0
  84. },
  85. 320: {
  86. slidesPerView: 1,
  87. spaceBetween: 0
  88. }
  89. }
  90. });
  91. });
  92. </script>
  93. <!-- Gallery End -->
Add Comment
Please, Sign In to add comment