File: /www/wwwroot/aiwellbore.com/wp-content/themes/study-education-pro/section-pagecolumn.php
<?php if ( is_home() || is_front_page() ) { ?>
<section id="pageboxes" <?php if( of_get_option('hidefourbxsec', true) != '' ) { ?>style="display:none"<?php } ?>>
<div class="container pageclmn">
<?php
$boxArr = array();
if( of_get_option('box1',true) != '' ){
$boxArr[] = of_get_option('box1',false);
}
if( of_get_option('box2',true) != '' ){
$boxArr[] = of_get_option('box2',false);
}
if( of_get_option('box3',true) != '' ){
$boxArr[] = of_get_option('box3',false);
}
if( of_get_option('box4',true) != '' ){
$boxArr[] = of_get_option('box4',false);
}
if (!array_filter($boxArr)) {
for($fx=1; $fx<=4; $fx++) {
?>
<div class="fourbox <?php if($fx % 4 == 0) { echo "last_column"; } ?>">
<a href="#">
<div class="thumbbx"><img src="<?php echo get_template_directory_uri(); ?>/images/services-icon<?php echo $fx; ?>.png" alt="" /></div>
<h3><?php esc_html_e('Business Services', 'study-education-pro') ?> <?php echo $fx; ?></h3>
</a>
<p><?php esc_html_e('Phasellus nec metus scelerisque, Proin id vehicula enim feugiat est quis, vestibulum ante. Proin id vehicula enim Pellentesque habitant...', 'study-education-pro') ?></p>
<a class="rdmore" href=""><?php esc_html_e('Read More', 'study-education-pro') ?></a>
</div>
<?php
}
} else {
$box_column = array('no_column','one_column','two_column','three_column','four_column');
$fx = 1;
$queryvar = new wp_query(array('post_type' => 'page', 'post__in' => $boxArr, 'posts_per_page' =>4, 'orderby' => 'post__in' ));
while( $queryvar->have_posts() ) : $queryvar->the_post(); ?>
<div class="fourbox <?php echo $box_column[count($boxArr)]; ?> <?php if($fx % count($boxArr) == 0) { echo "last_column"; } ?>">
<a href="<?php the_permalink(); ?>">
<?php if( of_get_option('boximg'.$fx, true) != '') { ?>
<div class="thumbbx">
<img alt="" src="<?php echo esc_url( of_get_option( 'boximg'.$fx, true )); ?>" / >
</div>
<?php } ?>
<h3><?php the_title(); ?></h3></a>
<?php echo content( of_get_option('pageboxlength') ); ?>
<?php if( of_get_option('pagemorebutton',true) != '') { ?>
<a class="rdmore" href="<?php the_permalink(); ?>"><?php echo of_get_option('pagemorebutton'); ?></a>
<?php } ?>
</div>
<?php
$fx++;
endwhile;
wp_reset_query();
}
?>
<div class="clear"></div>
</div><!-- .container -->
</section><!-- #pagearea -->
<?php } ?>