<?php
/**
 * The template for displaying index page.
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package hardware-dealer-pro
 */
get_header();
?>

<?php do_action( 'hardware_dealer_pro_after_defaulttitle' );
if ( ! is_plugin_active( 'elementor/elementor.php' )) {
	?>
<div class="post-section mt-5">
	<div class="container my-5">
		<div class="row">
			<div class="col-md-4">
					<?php while ( have_posts() ) : the_post();
						 if ($post->ID  = 1) { ?>
			          <img src="<?php echo esc_url(get_template_directory_uri(). '/assets/images/blog/default.png'); ?>">
			      <?php }else{
							if ( has_post_thumbnail() ) {
								the_post_thumbnail();
							}
						}  ?>
						 <h2>
							 <?php the_title(); ?>
						 </h2>
						 <?php
							the_content();
					endwhile;
					wp_reset_postdata();
					?>

			  <div class="navigation">
				<?php
				  the_posts_pagination( array(
					  'prev_text'          => __( 'Previous page', 'hardware-dealer-pro' ),
					  'next_text'          => __( 'Next page', 'hardware-dealer-pro' ),
					  'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'hardware-dealer-pro' ) . ' </span>',
				  )); ?>
			  </div>
			</div>
		</div>
	</div>
</div>
<?php }else{
	
	while ( have_posts() ) : the_post();
			if ( has_post_thumbnail() ) {
				the_post_thumbnail();
			}
			the_content();
	endwhile;
	wp_reset_postdata(); ?>
<?php } ?>
<!-- <div class="spinner-loading-box">
    <div class="demo">
      <div class="loader">
	  <img src="<?php// echo get_template_directory_uri() . '/assets/images/loader.gif'; ?>" alt="Loading...">
          <div class="loader-inner-1"></div>
          <div class="loader-inner-2"></div>
          <div class="loader-inner-3"></div>
      </div>	
    </div>
  </div> -->
<?php get_footer(); ?>