Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // the query to set the posts per page to 3
- $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
- $args = array(
- 'posts_per_page' => 3,
- 'paged' => $paged ,
- 'order' => 'ASC',
- );
- $custom_query = new WP_Query( $args ) ?>
- <!-- the loop -->
- <?php if ( $custom_query->have_posts() ) : while ($custom_query->have_posts()) : $custom_query->the_post(); ?>
- //Content
- <?php endwhile; ?>
- <!-- pagination -->
- <div>
- <?php if (function_exists("pagination")) {
- pagination($custom_query->max_num_pages);
- } ?>
- </div>
- <?php else : ?>
- <?php endif; ?>
- <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement