<?php
/**
 * The Template for displaying all single posts.
 *
 * @package hardware-dealer-pro
 */
// Top banner image start
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}
$single_product_col1="";
$single_product_col2="";
if(get_theme_mod('hardware-dealer-pro_products_single_page_sidebar',true)=='1')
{
	$single_product_col1="col-lg-8 col-md-12";
	$single_product_col2="col-lg-4 col-md-12";
}else
{
	$single_product_col1="col-lg-12 col-md-12";
	$single_product_col2="";
}

// Top banner image end
get_header();
$banner_img_backg = 'background-image:url(\''.esc_url(get_theme_mod('hardware_dealer_pro_banner_bgimages')).'\')';
?>

<!-- Top banner image start -->

<!-- Top banner image end -->


<div class="ebs-single-post-page hardware-section-main">
  <?php if ( is_singular( 'post' ) )  { ?>
    <div class="">
    <?php while ( have_posts() ) : the_post(); ?>
    <?php if ( has_post_thumbnail() ) { ?>
         <div class="service_img">
            <img src="<?php the_post_thumbnail_url( 'full' ); ?>">
         </div>
         <?php } ?>
      <div class="row" id="single_post">    
         
          <div class="container">
            <div class="content_page">
              <div class="content-box hw_container">
              
              <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                  <div class="single-page-title">
                    <h2><?php the_title(); ?></h2>
                  </div>
                  <div class="single-page-metabox">
                    <?php if ( get_theme_mod('hardware-dealer-pro_general_settings_post_author',true) == "1" ) { ?>
                      <div class="single-author-image">
                        <img src="<?php echo esc_url( get_avatar_url( $current_user->ID ) ); ?>">
                          <a>
                            <span><?php the_author(); ?></span>
                          </a>
                      </div>                
                    <?php } ?>
                    <div class="single-date-box">
                        <span class="entry-date">
                        <?php echo get_the_date( 'M j, Y' ); ?>
                        </span>
                    </div>
                    <div class="single-date-comments">
                      <span class="entry-comments"> 
                        <?php comments_number( '0 Comment', '1 Comment', '% Comments' ); ?>
                      </span>
                    </div>
                  </div>   
                  
                  <div class="single-blog-des">
                    <div class="">
                      <?php the_content();?>
                    </div>
                  </div>

                  <?php if(get_post_meta($post->ID,'meta_blog_title',true)) { ?>
                    <div class="meta-title">
                      <h4><?php echo esc_html(get_post_meta(get_the_ID(),'meta_blog_title',true)); ?></h4>
                    </div>
                  <?php } ?>
                  <?php if(get_post_meta($post->ID,'meta_blog_para_1',true)) { ?>
                    <div class="meta-para">
                      <p><?php echo esc_html(get_post_meta(get_the_ID(),'meta_blog_para_1',true)); ?></p>
                    </div>
                  <?php } ?>

                  <?php if(get_post_meta($post->ID,'meta-image1',true) && get_post_meta($post->ID,'meta-image2',true)) { ?>
                    <div class="single-page-meta-image">
                      <div class="image-wrapper">
                        <?php if(get_post_meta($post->ID,'meta-image1',true)) { ?>
                          <img src="<?php echo esc_html(get_post_meta($post->ID,'meta-image1',true)); ?>" alt="Single Blog Image">
                        <?php } ?>
                      </div>
                      <div class="image-wrapper">
                        <?php if(get_post_meta($post->ID,'meta-image2',true)) { ?>
                          <img src="<?php echo esc_html(get_post_meta($post->ID,'meta-image2',true)); ?>" alt="Single Blog Image">
                        <?php } ?>
                      </div>
                  </div> 
                  <?php } ?>

                  <?php if(get_post_meta($post->ID,'meta_blog_para_2',true)) { ?>
                    <div class="meta-para">
                      <p><?php echo esc_html(get_post_meta(get_the_ID(),'meta_blog_para_2',true)); ?></p>
                    </div>
                  <?php } ?>
        
                  <div class="clearfix"></div> 
                  <div class="blog_comment_box single-post-comment contact-form ">
                    <?php 
                      if ( comments_open() || '0' != get_comments_number() ) {
                                  comments_template();
                              }
                    ?>
                    
                   
                  </div>  
                  </div>
                </div>
              </article>
            <?php 
            endwhile; // end of the loop. ?>
          </div>
      </div>
      <div class="clearfix"></div>
      </div>
    </div>
  <?php } ?>
</div>
<?php get_footer(); ?>
