<?php
/**
 * This file is responsible for the services section2 on front page.
 * @version:1.0
 */
?>  

   <?php if ( true == get_theme_mod( 'newssectiononoff', true ) ) : ?>
      <!--start Why Choose Us Area -->
      <section id="news" class="">
         <div class="container">
            <div class="row text-center  ">
               <div class="title wow fadeInUp">
                  <h1><?php  _e(get_theme_mod('homepage_news_title', __('' , 'star-law-firm-lite'))); ?></h1>
                  <div class="hed_img"> 
                     <img src="<?php echo esc_attr(get_theme_mod('homepage_news_bgimage',  get_template_directory_uri() . '')); ?>">
                  </div>
                  <p> <?php  _e(get_theme_mod('homepage_news_text', __('' , 'star-law-firm-lite'))); ?></p>
               </div>
            </div>
            <div class="row about_row ">
              <?php
                    $capablities = get_theme_mod( 'homepage_news_section');
                    if(isset($capablities) && !empty($capablities)){
                    foreach ( $capablities as $item ) : ?>
                       <?php if ( ! wp_attachment_is_image( $item['news_image'] ) ){

                        $img_ur = esc_url_raw($item['news_image']);

                    } else {
                        $img_ur = wp_get_attachment_url($item['news_image']);
                    } ?>

               <div class="col-md-4 col-sm-6 col-xs-12 wow fadeInUp">
                  <a href="blog-single.html">     
                   <img src="<?php echo ( $img_ur ); ?>"></a>
                      <div class="blog-body">
                          <h1> 
                            <a href="blog-single.html"> <?php echo ($item['news_heading']); ?></a>    
                          </h1>
                             <p><?php echo ($item['news_content']); ?></p>
                         <div class="">
                            <a href="<?php echo ($item['news_buttonlink']); ?>" class="button-buttom"> <?php echo ($item['news_buttontext']); ?>   </a>
                         </div>
                      </div>
               </div>
               <?php endforeach; ?>
                    <?php }?>
            </div>
         </div>
      </section>
      <!--End Why Choose Us Area -->
       <?php endif;?>