Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : ( get_query_var( 'page' ) ? get_query_var( 'page' ) : 1 );
- $args = array(
- 'post_type' => 'photo',
- 'post_status' => 'publish',
- 'paged' => $paged,
- 'posts_per_page' => 8,
- 'ignore_sticky_posts' => 1
- );
- $photo_query = new WP_Query( $args );
- // Posts start
- if ( $photo_query->have_posts() ) :
- while ( $photo_query->have_posts() ) :
- $photo_query->the_post(); ?>
- <!-- One post -->
- <div class="entry">
- <h2 class="title"><?php the_title(); ?></h2>
- </div>
- <?php endwhile; ?>
- <!-- Pagination -->
- <div class="navigation">
- <div class="alignleft"><?php next_posts_link('ยซ Older Entries') ?></div>
- <div class="alignright"><?php previous_posts_link('Newer Entries ยป') ?></div>
- </div>
- <?php else : ?>
- <h2>Not Found</h2>
- <p>Sorry, but you are looking for something that isn't here.</p>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement