Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template name: Showcase Template
- */
- get_header();
- if ( have_posts() ){
- the_post();
- ?>
- <!-- Main -->
- <div id="main">
- <!-- Main Content -->
- <div id="main-content">
- <!-- Showcase Holder -->
- <div id="showcase-holder">
- <div id="showcase-tilt-wrap">
- <div id="showcase-tilt">
- <div id="showcase-slider" class="swiper-container">
- <div class="swiper-wrapper">
- <?php
- $satelite_paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $satelite_args = array(
- 'post_type' => 'satelite_portfolio',
- 'paged' => $satelite_paged,
- 'posts_per_page' => 1000,
- );
- $satelite_portfolio = new WP_Query( $satelite_args );
- $satelite_slides_count = 1;
- while( $satelite_portfolio->have_posts() ){
- $satelite_portfolio->the_post();
- $satelite_showcase_include = satelite_get_post_meta( SATELITE_THEME_OPTIONS, get_the_ID(), 'satelite-opt-portfolio-showcase-include' );
- if( $satelite_showcase_include == "yes" ){
- $satelite_hero_properties = new SateliteHeroProperties();
- $satelite_hero_properties->getProperties( get_post_type( get_the_ID() ) );
- ?>
- <!-- Section Slide -->
- <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 ); ?>">
- <div class="img-mask">
- <div class="section-image" data-src="<?php echo esc_url( $satelite_hero_properties->image['url'] ); ?>">
- <?php if( $satelite_hero_properties->video ) { ?>
- <div class="hero-video-wrapper">
- <video loop muted class="bgvid">
- <?php if( !empty( $satelite_hero_properties->video_mp4 ) ) { ?>
- <source src="<?php echo esc_url( $satelite_hero_properties->video_mp4 ); ?>" type="video/mp4">
- <?php } ?>
- <?php if( !empty( $satelite_hero_properties->video_webm ) ) { ?>
- <source src="<?php echo esc_url( $satelite_hero_properties->video_webm ); ?>" type="video/webm">
- <?php } ?>
- </video>
- </div>
- <?php } ?>
- </div>
- </div>
- <?php if( satelite_get_theme_options('clapat_satelite_enable_ajax') ){ ?>
- <a class="showcase-link-project" data-type="page-transition" href="<?php the_permalink(); ?>"></a>
- <?php } else { ?>
- <a class="showcase-link-project" href="<?php the_permalink(); ?>"></a>
- <?php } ?>
- </div>
- <!--/Section Slide -->
- <?php
- $satelite_slides_count++;
- }
- }
- wp_reset_postdata();
- ?>
- </div>
- </div>
- </div>
- </div>
- <div class="showcase-pagination-wrap">
- <div class="showcase-counter" data-total="<?php echo esc_attr( sprintf("%02d", $satelite_slides_count - 1) ); ?>"></div>
- <div class="showcase-pagination"></div>
- <div class="caption-border left"></div>
- <div class="caption-border right"></div>
- <div class="arrows-wrap">
- <div class="prev-wrap parallax-wrap"><div class="swiper-button-prev swiper-button-white parallax-element"></div></div>
- <div class="next-wrap parallax-wrap"><div class="swiper-button-next swiper-button-white parallax-element"></div></div>
- </div>
- </div>
- </div>
- <!-- Showcase Holder -->
- </div>
- <!-- /Main Content -->
- </div>
- <!--/Main -->
- <?php
- $satelite_showcase_hold_caption = satelite_get_post_meta( SATELITE_THEME_OPTIONS, get_the_ID(), 'satelite-opt-page-showcase-hold-on-caption' );
- wp_localize_script( 'satelite-scripts',
- 'ClapatSateliteHoldOnCaption',
- array( "text" => esc_js( $satelite_showcase_hold_caption ) ) );
- }
- get_footer();
- ?>
Add Comment
Please, Sign In to add comment