<?php /* Template Name: Photogallery  */ ?>

<?php  
get_header();
global $themesbazar;

?>
     
               
                
             <!--==========top scroll start==============-->
   
                
        <div class="top-scroll-section">
            <div class="container">
                <div class="row">
                    <div class="top_scroll">
                        <div class="col-md-2 col-sm-3">
                            <div class="top_scrool_1">
							<?php echo $themesbazar['top_scroll_title'] ?>
                            </div>
                        </div>
                        <div class="col-md-10 col-sm-9">
							
                                <div class="top_scrool_2">
								
							
															
								   <marquee direction = "left" scrollamount="4px" onmouseover="this.stop()" onmouseout="this.start()">
							<?php 
								$how_post= $themesbazar['how-to-notic'];
								$total_how_post=$how_post-0;
								$themes_bazar = new WP_Query(array(
									'post_type' => 'notic',
									'posts_per_page' => $total_how_post,
									'offset'     =>0,
								));
								while($themes_bazar->have_posts()) : $themes_bazar->the_post(); ?>								   
								   <a href="<?php the_permalink()?>"> <?php the_title() ?> <i class="fa fa-square" aria-hidden="true"></i> </a>
								 <?php endwhile?>

								   </marquee>
									
							   
								 
								</div>
							
                        </div>
                    </div>
                </div>
            </div>
        </div>
                
				
              <!--==========top scroll End==============-->
  
    <!--===================photogallery page===================-->
    
    <div class="photogallery-page-section">
        <div class="container">
            <div class="row">
                
				
				<?php
						$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
						$args = array(
							'post_type' => 'photogallery',
							'paged' => $paged
						); $the_query = new WP_Query($args); if( $the_query->have_posts() ) : ?> 
						<?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
                   
                <div class="col-md-3 col-sm-3">
                    <div class="gallery-item">
                        <div class="gallery-wrpp">
                            <?php the_post_thumbnail();?>
                            <div class="photo-title">
                                <div class="photo-content">
                                   <a href="<?php the_permalink();?>"><?php the_title() ?></a>
                                </div>
                              
                            </div>
                        </div>
                    </div>
                    
                </div>
                <?php endwhile; ?>

               <div class="col-md-12 options border-bottom">

				<!-- pagination -->
				<ul class="pagination pull-left">
				<li><?php echo get_previous_posts_link( '<span class="glyphicon glyphicon-backward"></span>' ); ?></li>
					<li><?php echo get_next_posts_link( '<span class="glyphicon glyphicon-forward"></span>', $the_query->max_num_pages ); ?></li>
					
				</ul>

			</div>
			<!-- /.options -->  

			<?php wp_reset_postdata(); ?>

			<?php else:  ?>

			<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>

			<?php endif; ?>
                
                
            </div>
               
               
            
            
            
            
        </div>
    </div>
    
      
    
    
    
    
    
    

    
         
  <?php get_footer();
			get_template_part('include/root');
			wp_footer();
			?>
    </body>
</html>
