File: /var/www/likoholding/liko-holding.com.ua/wp-content/themes/likoholding/vcentered-dark-gallery.php
<?php /* Template Name: VCentered Gallery */ get_header(); ?>
<style type="text/css">
.innerpage_title{
margin-top: 30px;
position: relative;
}
</style>
<main role="main">
<!-- section -->
<section class="main_section">
<div class="col-xl-12 valigned_main dark gallery_container" style="background: none">
<div class="main_content">
<div class="toprow">
<a href="<?php echo get_permalink($post->post_parent);?>" class="back_link"><span>←</span> <?php pll_e( 'Back' );?></a>
</div>
<h2 class="innerpage_title"><?php the_title(); ?></h2>
<div class="row dark_content gallery clearfix">
<div class="col-xl-4 dark_right">
<?php if (have_posts()): while (have_posts()) : the_post(); ?>
<?php the_content(); // Dynamic Content ?>
<?php endwhile;
endif; ?>
</div>
<div class="col-xl-8 dark_left gallery">
<div style="display: none;" class="photocid_swich">
<?php
if(get_locale() == 'uk') {?>
<a href="/gallery/" class="active">Фото</a>
<a href="/video-gallery/">Видео</a>
<?php } else if ( get_locale() == 'en_US' ){?>
<a href="/en/gallery/" class="active">Photo</a>
<a href="/en/video-gallery/">Video</a>
<?php };
?>
</div>
<div class="scrollpan_block">
<div class="scrollpan_content text">
<div class="clearfix">
<?php
$childargs = array(
'post_type' => 'page',
'posts_per_page' => -1,
'post_parent' => $post->ID,
'order' => 'ASC',
'orderby' => 'date'
);
$parent = new WP_Query( $childargs );
if ( $parent->have_posts() ) : ?>
<?php while ( $parent->have_posts() ) : $parent->the_post(); ?>
<div id="child-<?php the_ID(); ?>" class="maingalleryItem clearfix">
<a class="post_imageLink" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php $BlogChildurl = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );?>
<div class="post_image" style="background-image:url(<?php echo $BlogChildurl; ?>)">
<div class="hover_wrap">
<div class="hover_inner">
</div>
</div>
</div>
</a>
<div class="post_text ddd">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div class="short_info"><?php the_content(); ?></div>
</div>
</div>
<?php endwhile; ?>
<?php endif; wp_reset_query(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
jQuery(document).ready(function(){
jQuery('.slide').each(function(){
var slideBG = jQuery(this).find('img').attr('src');
jQuery(this).css('background-image', 'url(' + slideBG + ')');
})
});
jQuery('.innerpage_content .slider_block').each(function(){
if ( jQuery(this).find('.slide').length > 1 ) {
jQuery(this).find('.gallery').bxSlider({
slideMargin: 0,
controls: true,
pager: false,
useCSS: false,
auto: true,
autoStart: true,
pause: 5000,
speed: 1500
});
}
});
jQuery('.left_side .innerpage_menu a').click(function(){
jQuery(this).addClass('current').parent().siblings().find('a').removeClass('current');
var blockIndex = jQuery(this).parent().index()+1;
jQuery('.left_side .scrollpan_abs:nth-child('+blockIndex+')').addClass('current').siblings().removeClass('current');
});
</script>
<!-- /section -->
</main>
<?php get_footer(); ?>