BUENAS AMIGOS
Estoy trabajando en un sitio en wordpress donde tengo una galeria de imagenes que me muestra las imagenes en 4 columnas quisiera que me mustre las imagenes en columnas de 2 y sucesivamente las demas esten abajo de igual manera de 2 en 2.
CODIGO PHP DE LA GALERIA DE IMAGENES:
Código PHP:
Ver original<?php global $post;
$kk_parallax = kk_parallax();
$title_type = $kk_parallax[0];
$bg_title_img = $kk_parallax[1];
$grid_p = 'is_inner';
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if( $title_type == 'parallax' ) { ?>
<!-- start parallax container -->
<div class="content clearfix">
<div id="kk-parallax-wrapper" class="kk-parallax-wrapper">
<div id="kk-parallax-bg" class="kk-parallax-bg kk-hidden">
<img id="kk-img-check" src="<?php echo esc_url( $bg_title_img ) ?>" alt="" />
</div>
<div id="kk-parallax-title-wrapper" class="kk-parallax-title-wrapper">
<div id="kk-parallax-title" class="page-title">
<?php the_title( '<h1>', '</h1>' ); ?>
</div>
</div>
<a id="kk-down" class="kk-down is-loading" href="#kk-to-me"></a>
</div>
</div>
<?php $grid_p = 'not_is_inner'; ?>
<?php } ?>
<?php if ( post_password_required( $post ) ) { ?>
<div class="content-inner-wrapper clearfix">
<?php echo get_the_password_form(); ?>
</div>
<?php } else { ?>
<!-- start gallery container -->
<div class="fullmasonry grid-gal <?php echo esc_attr( $grid_p ) ?>">
<span id="kk-to-me"></span>
<!-- start gallery -->
<div class="gallery-full-masonry">
<ul class="masonry-container">
<?php
$attachments = rwmb_meta( 'kk_imgadv', 'type=image_advanced' );
foreach ($attachments as $attachment) {
$koto_gridType = get_post_meta(get_the_ID(), '_grid_type_value', true);
$ex = '';
if ($koto_gridType == 'Landscape') {
$ex = 'grid-landscape';
} else if ($koto_gridType == 'Portrait') {
$ex = 'grid-portrait';
} else if ($koto_gridType == 'Square') {
$ex = 'grid-square';
} else if ($koto_gridType == 'Random') {
$ex = 'grid-random';
};
$featured_image = aq_resize($attachment['full_url'],$tt[0],$tt[1], true, false ); ?>
<li id="
<?php echo esc_attr
($attachment['ID']) ?>"
<?php post_class
(array('masonry-box', $ex)); ?> >
<div class="gallery-thumb">
<a class="kk-lightbox img-loading" data-group="kk-lightbox[<?php the_ID();?>]" href="<?php echo esc_url($attachment['full_url']) ?>" data-title="<?php echo esc_attr($attachment['title']) ?>" style="padding-bottom:<?php echo esc_attr( $featured_image[2]/$featured_image[1] * 100); ?>%">
<img class="doLazyLoad" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" width="<?php echo esc_attr( $featured_image[1] ); ?>" height="<?php echo esc_attr( $featured_image[2] ); ?>" data-original="<?php echo esc_url($featured_image[0]); ?>" title="<?php echo esc_attr($attachment['title']) ?>" alt="<?php echo esc_attr($attachment['alt']) ?>" />
<span class="kk-n"><?php _e('View','toppic'); ?></span>
</a>
</div>
</li>
<?php } ?>
</ul>
</div>
<!-- end gallery -->
<?php } ?>
</div>
<!-- end gallery container -->
<?php $content = get_the_content();
if(!empty($content)) { ?>
<div class="info-fs-form kk-active-button">
<!-- start info close icon -->
<div class="kk-info-close">
<span></span>
</div>
<!-- end info close icon -->
<div class="content-inner-wrapper">
<div class="content-child">
<?php the_content(); ?>
</div>
</div>
</div>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>