File: /home/dailyajk/public_html/wp-content/themes/jphostbd-news12/news-photo.php
<?php /* Template Name: Photo Gallery Page */ ?>
<?php get_header() ?>
<?php global $jphostbd ?>
<!---------- Home Section Section Start ---------->
<section class="single_section">
<div class="container">
<div class="row">
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
'post_type' => 'news-photo',
'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-4 col-sm-4">
<div class="photo">
<a href="<?php echo get_the_post_thumbnail_url();?>" data-lightbox="myimage">
<?php if(has_post_thumbnail()){
the_post_thumbnail();}
?>
</a>
<div class="photo_title"><?php the_title();?></div>
</div>
</div>
<?php endwhile; ?>
</div>
<div class="row">
<div class="col-md-12 options">
<!-- pagination -->
<ul class="pagination pull-left">
<li> <?php echo get_previous_posts_link ('<span class="glyphicon glyphicon-arrow-left"></span>'); ?></li>
<li> <?php echo get_next_posts_link ('<span class="glyphicon glyphicon-arrow-right"></span>', $the_query->max_num_pages ); ?></li>
</ul>
</div>
</div>
<!-- /.options -->
<?php wp_reset_postdata(); ?>
<?php endif; ?>
</div>
</section>
<!---------- Home Section Section Close ---------->
<?php get_footer();?>