<!-- =========================
     Page Breadcrumb   
============================== -->
<?php get_header(); 
get_template_part('index','banner'); ?>
<div class="clearfix"></div>
<!-- =========================
     Page Content Section      
============================== -->
<main id="content" class="single-class">
  <div class="container">
    <div class="row"> 
    <?php $businessup_single_page_layout = get_theme_mod('businessup_single_page_layout','align-content-right');
      if($businessup_single_page_layout == 'align-content-left'){ ?>
        <div class="col-md-3">
          <?php get_sidebar(); ?>
        </div>
      <?php } 
      if(($businessup_single_page_layout == 'align-content-left') || ($businessup_single_page_layout == 'align-content-right')){ ?>
        <div class="col-md-9">
      <?php } else { ?>
        <div class="col-md-12">
      <?php } ?>
		      <?php if(have_posts())
		        {
		      while(have_posts()) { the_post(); ?> 
            <div class="businessup-blog-post-box"> <a href="#" class="businessup-blog-thumb">
			        <?php if(has_post_thumbnail()): ?>
			         <?php $defalt_arg =array('class' => "img-fluid"); ?>
			         <?php the_post_thumbnail('', $defalt_arg); ?>
			        <?php endif; ?>
			        </a>
              <article class="small">
                <?php $post_category = get_theme_mod('post_category_enable',false);
                $post_title = get_theme_mod('post_title_enable',false);
                $post_meta = get_theme_mod('post_meta_enable',false);
                if($post_title !== true) { ?>
                <h1 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
                <?php } if(($post_category !== true) || ($post_meta !== true)) { ?>
                <div class="businessup-blog-category"> 
                  <?php if($post_meta !== true){ ?>
                    <span class="businessup-blog-date">
                      <a href="<?php echo esc_url(get_month_link(esc_html(get_post_time('Y')),esc_html(get_post_time('m')))); ?>">
                        <?php echo esc_html(get_the_date()); ?>
                      </a>
                    </span> 
					        <?php } if($post_category !== true) { ?>
                    <span class="cat-links">  
                      <?php   $cat_list = get_the_category_list();
                      if(!empty($cat_list)) { ?>
                      <?php the_category(', '); ?>
                      <?php } ?>
                    </span>
                  <?php } if($post_meta !== true){ ?>	
                    <a class="businessup-author" href="<?php echo esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) ));?>"><?php esc_html_e('by','businessup'); ?>
                      <?php the_author(); ?>
                    </a> 
                  <?php } 
                  $tags = get_the_tags();
                  if($tags){  ?>
                    <span class="consultup-tags"><i class="fa fa-tag"></i>
                      <?php
                      $keys = array_keys($tags);
                        foreach ($tags as $key => $tag) {
                          $tag_link = get_tag_link($tag->term_id);
                          if ($key === end($keys)) {
                            echo '<a href="'.esc_url($tag_link).'">#'.esc_html($tag->name).'</a>';
                          } else {
                            echo ' <a href="'.esc_url($tag_link).'">#'.esc_html($tag->name).'</a>, ';
                          }
                        } ?>
                    </span>
                  <?php } ?>
                </div>
                <?php } the_content(); ?>
              </article>
            </div> 
		      <?php } ?> 
            <?php the_posts_navigation(); ?>
            <div class="media businessup-info-author-block"> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>" class="businessup-author-pic"> <?php echo get_avatar( get_the_author_meta( 'ID') , 150); ?> </a>
              <div class="media-body">
                <h4 class="media-heading"><span><?php esc_html_e('by','businessup'); ?></span><a href "<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) );?>"><?php the_author(); ?></a></h4>
                <p><?php the_author_meta( 'description' ); ?></p>
                <div class="row">
                  <div class="col-md-6 col-pad7">
                    <ul class="list-inline info-author-social">
          					<?php 
          					$facebook_profile = get_the_author_meta( 'facebook_profile' );
          					if ( $facebook_profile && $facebook_profile != '' ) {
          					  echo '<li class="facebook"><a href="' . esc_url($facebook_profile) . '"><i class="fa fa-facebook-square"></i></a></li>';
          					} 
					
          					$twitter_profile = get_the_author_meta( 'twitter_profile' );
          					if ( $twitter_profile && $twitter_profile != '' ) 
          					{
          					  echo '<li class="twitter"><a href="' . esc_url($twitter_profile) . '"><i class="fa fa-twitter-square"></i></a></li>';
          					}
					
          					$google_profile = get_the_author_meta( 'google_profile' );
          					if ( $google_profile && $google_profile != '' ) {
          					  echo '<li class="googleplus"><a href="' . esc_url($google_profile) . '" rel="author"><i class="fa fa-google-plus-square"></i></a></li>';
          					}
          					$linkedin_profile = get_the_author_meta( 'linkedin_profile' );
          					if ( $linkedin_profile && $linkedin_profile != '' ) {
          					  echo '<li class="linkedin"><a href="' . esc_url($linkedin_profile) . '"><i class="fa fa-linkedin-square"></i></a></li>';
          					}
          					?>
                    </ul>
                  </div>
                </div>
              </div>
            </div> 
		      <?php } ?>
         <?php comments_template('',true); ?>
      </div>
      <?php if($businessup_single_page_layout == 'align-content-right'){ ?>
        <div class="col-md-3">
          <?php get_sidebar(); ?>
        </div>
      <?php } ?>
    </div>
  </div>
</main>
<?php get_footer(); ?>