<?php
/**
 * Template Name: Book Listing
 *
 */
 ?>
<?php get_header(); ?>
 
   <div id="full-content" class="our-team-page">
		<section style="background: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/our-team-banner-bg.jpg')no-repeat center/cover;"  class="media-banner-bg">      					
	      <div class="container">
	          <h1 class="page-title-cus">Books</h1>
	      </div>
	    </section>

	    <div class="container-fluid pl-0 pr-0">
        <section class="books-wrap-home">
            <div class="container"> 
				<div class="page-content text-justify fontstyle">
                    <?php the_content(); ?>
                </div>
               <section class="books-bg">  
                    <?php
                    $type = 'Books';
                    $args=array(
                      'post_type' => $type,
                      'post_status' => 'publish',
                      'posts_per_page' => -1,
                      'order'    => 'ASC'
                    );
                    $my_query = null;
                    $my_query = new WP_Query($args);                 
                  if( $my_query->have_posts() ) { ?>                    
                      <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
                          
                    <div class="book-item">
                      <?php the_post_thumbnail(); ?>
                      <div class="middle"></div>
                      <a href="<?php echo get_field('books-link'); ?>" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/hover-icon.png" /></a>
                    </div>
                    
                      <?php
                      endwhile;
                    } ?>                     
                    <?php wp_reset_query();  // Restore global post data stomped by the_post().
              ?>    


                  <div class="clearfix"></div>
                  <div class="books-inner-bg">
                      <img src="http://mshop.php-dev.in/marcellus/wp-content/uploads/2018/11/books-bg.png" />
                  </div>
               </section>


          </div>
      </section>
	    </div>
	</div>
 
<?php get_footer(); ?>