     <div class="container-fluid page_content row ourresources">
        <div class="col-sm-12 ">
          
          <div class="row">
            <?php
 $boxvariable = array();
 for($k=1;$k<=4;$k++){?>
  <?php $boxid = absint(get_theme_mod('box'.$k));?>
  <?php $boxquery = new WP_query('page_id='.$boxid); //print_r($boxquery);?>
  <?php if ($boxquery->have_posts() && $boxid>0) : 
  while( $boxquery->have_posts() ) : $boxquery->the_post();
    //$image = wp_get_attachment_url( get_post_thumbnail_id($post->ID,'home-banner-size'));
   $thumbnail_id = get_post_thumbnail_id( $post->ID );
   $alt = esc_html(get_post_meta($thumbnail_id, '_wp_attachment_image_alt', true));
   $image = esc_url(get_the_post_thumbnail_url( $post->ID, 'eatingplace-home-box-size'));
   $title = esc_html(get_the_title( $post->ID ));
   $my_postid = $post->ID;
 $content = esc_html(eatingplace_get_excerpt($my_postid,'250'));
  $url = esc_url(get_the_permalink($my_postid));
  $boxvariable[] = array('boxid'=>$post->ID,'boximage'=>$image,'alt'=>$alt,'box_title'=>$title,'box_content'=>$content,'url'=>$url);
  endwhile;
  wp_reset_postdata();
   endif;
  ?>
  
<?php }?>
<?php //echo "<pre>";print_r($boxvariable); echo "</pre>";?>
<div class="col-md-12 menuheading"><h2><?php echo esc_html(get_theme_mod('box_heading')); ?></h2></div>
<?php foreach($boxvariable as $boxvariables){?>
  <div class="col-md-3 text-center eatbox">
    <div class="thumbnail">
      <a href="<?php echo esc_url($boxvariables['url']);?>">
        <img src="<?php echo esc_url($boxvariables['boximage']);?>" title="<?php echo esc_attr($boxvariables['alt']);?>" class="img-responsive img-thumbnail">        
      </a>
      <div class="mainboxcontent">
        <div class="caption">
           <a href="<?php echo esc_url($boxvariables['url']);?>"><h3><?php echo esc_html($boxvariables['box_title']);?></h3></a>
        </div>
      <div class="boxcontent"><?php $boxid = esc_html($boxvariables['boxid']);
      echo esc_html(eatingplace_get_excerpt($boxid,150));
      ?></div>      
      </div><!--mainboxcontent-->
    </div>
  </div>
  <?php }?>  
  <div class="clearfix"></div>
</div>
</div><!--site-main -->
<div class="clearfix"></div>