<?php
/**
 * About Section
*/
  if (get_theme_mod('the_angle_about_section','no')=='yes') {
      $post_id = get_theme_mod('the_angle_about_post');
      $about_title = get_theme_mod('the_angle_about_us_title',esc_html__('About Us','the-angle'));
      $the_angle_about_section_layout = get_theme_mod('the_angle_about_section_layout','layout-1');
      if(!empty($post_id)):
              ?>
          <section id="about-section" class="the-angle-about-section <?php echo esc_attr($the_angle_about_section_layout); ?>">
              <div class="tc-container">
                  <?php
                    $aboutimage = get_theme_mod('the_angle_about_bkgimage','');
                    if(!empty($aboutimage)){ ?>
                  <div class="about-img wow fadeInRight" data-wow-delay="1s">
                   <a href="<?php the_permalink();?>"><img src="<?php echo esc_url($aboutimage); ?>" /></a>
                  </div>
                  <?php }
                  ?>
                
                  <?php
                  $about_args  = array('post_type'=>'post', 'p' => $post_id, 'post_status' => 'publish','posts_per_page'=>1);
                  $about_query = new WP_Query($about_args);
                    if ($about_query->have_posts()):
                        while ($about_query->have_posts()):
                            $about_query->the_post();
                            ?>
                            <div class="about-content-wrap">
                              <h2 class="section-title">
                                    <?php echo esc_html($about_title);?>
                                </h2>
                               <div id="about-post" class="about-post wow fadeInUp" data-wow-delay="0.4s" >
                                  <h2 class="title"><?php the_title(); ?></h2>
                               </div>
                               <div class="about-desc">
                                  <div id="about-post-1" class="about-post wow fadeInUp" data-wow-delay="0.6s" >
                                  <?php echo esc_attr(wp_trim_words(get_the_content(),'150','...')); ?>
                                  </div>
                               </div>
                               <div id="about-post" class="about-post wow fadeInUp" data-wow-delay="0.8s" >
                               <div class="btn-wrapper"><a href="<?php the_permalink(); ?>" class="btn more"><?php echo esc_html(get_theme_mod('the_angle_about_readmore',esc_html__('Know More','the-angle'))); ?></a>
                                  </div>
                                  </div>
                            </div>

                           <?php
                        endwhile;
                         wp_reset_postdata();
                    endif;
                      ?>
                </div>
          </section>
      <?php
    endif;
     }
        ?>
