Guest User

Untitled

a guest
May 11th, 2020
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. <?php
  2. /*
  3. Template name: Showcase Template
  4. */
  5.  
  6. get_header();
  7.  
  8. if ( have_posts() ){
  9.  
  10. the_post();
  11.  
  12. ?>
  13.  
  14. <!-- Main -->
  15. <div id="main">
  16.  
  17. <!-- Main Content -->
  18. <div id="main-content">
  19.  
  20. <!-- Showcase Holder -->
  21. <div id="showcase-holder">
  22. <div id="showcase-tilt-wrap">
  23. <div id="showcase-tilt">
  24. <div id="showcase-slider" class="swiper-container">
  25. <div class="swiper-wrapper">
  26. <?php
  27.  
  28. $satelite_paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  29. $satelite_args = array(
  30. 'post_type' => 'satelite_portfolio',
  31. 'paged' => $satelite_paged,
  32. 'posts_per_page' => 1000,
  33. );
  34.  
  35. $satelite_portfolio = new WP_Query( $satelite_args );
  36.  
  37. $satelite_slides_count = 1;
  38. while( $satelite_portfolio->have_posts() ){
  39.  
  40. $satelite_portfolio->the_post();
  41.  
  42. $satelite_showcase_include = satelite_get_post_meta( SATELITE_THEME_OPTIONS, get_the_ID(), 'satelite-opt-portfolio-showcase-include' );
  43.  
  44. if( $satelite_showcase_include == "yes" ){
  45.  
  46. $satelite_hero_properties = new SateliteHeroProperties();
  47. $satelite_hero_properties->getProperties( get_post_type( get_the_ID() ) );
  48.  
  49. ?>
  50. <!-- Section Slide -->
  51. <div class="swiper-slide<?php if( $satelite_hero_properties->video ) { echo " bg-video"; } ?>" data-number="<?php echo esc_attr( sprintf("%02d", $satelite_slides_count) ); ?>" data-title="<?php echo esc_attr( $satelite_hero_properties->caption_title ); ?>" data-subtitle="<?php echo esc_attr( $satelite_hero_properties->caption_subtitle ); ?>">
  52. <div class="img-mask">
  53. <div class="section-image" data-src="<?php echo esc_url( $satelite_hero_properties->image['url'] ); ?>">
  54. <?php if( $satelite_hero_properties->video ) { ?>
  55. <div class="hero-video-wrapper">
  56. <video loop muted class="bgvid">
  57. <?php if( !empty( $satelite_hero_properties->video_mp4 ) ) { ?>
  58. <source src="<?php echo esc_url( $satelite_hero_properties->video_mp4 ); ?>" type="video/mp4">
  59. <?php } ?>
  60. <?php if( !empty( $satelite_hero_properties->video_webm ) ) { ?>
  61. <source src="<?php echo esc_url( $satelite_hero_properties->video_webm ); ?>" type="video/webm">
  62. <?php } ?>
  63. </video>
  64. </div>
  65. <?php } ?>
  66. </div>
  67. </div>
  68. <?php if( satelite_get_theme_options('clapat_satelite_enable_ajax') ){ ?>
  69. <a class="showcase-link-project" data-type="page-transition" href="<?php the_permalink(); ?>"></a>
  70. <?php } else { ?>
  71. <a class="showcase-link-project" href="<?php the_permalink(); ?>"></a>
  72. <?php } ?>
  73. </div>
  74. <!--/Section Slide -->
  75. <?php
  76.  
  77. $satelite_slides_count++;
  78. }
  79.  
  80. }
  81.  
  82. wp_reset_postdata();
  83. ?>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="showcase-pagination-wrap">
  89. <div class="showcase-counter" data-total="<?php echo esc_attr( sprintf("%02d", $satelite_slides_count - 1) ); ?>"></div>
  90. <div class="showcase-pagination"></div>
  91. <div class="caption-border left"></div>
  92. <div class="caption-border right"></div>
  93. <div class="arrows-wrap">
  94. <div class="prev-wrap parallax-wrap"><div class="swiper-button-prev swiper-button-white parallax-element"></div></div>
  95. <div class="next-wrap parallax-wrap"><div class="swiper-button-next swiper-button-white parallax-element"></div></div>
  96. </div>
  97. </div>
  98. </div>
  99. <!-- Showcase Holder -->
  100.  
  101. </div>
  102. <!-- /Main Content -->
  103.  
  104. </div>
  105. <!--/Main -->
  106.  
  107. <?php
  108. $satelite_showcase_hold_caption = satelite_get_post_meta( SATELITE_THEME_OPTIONS, get_the_ID(), 'satelite-opt-page-showcase-hold-on-caption' );
  109. wp_localize_script( 'satelite-scripts',
  110. 'ClapatSateliteHoldOnCaption',
  111. array( "text" => esc_js( $satelite_showcase_hold_caption ) ) );
  112. }
  113.  
  114. get_footer();
  115.  
  116. ?>
Add Comment
Please, Sign In to add comment