Created
November 23, 2013 11:02
-
-
Save dompascal/7613283 to your computer and use it in GitHub Desktop.
WP - Query with Pagination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $wp_query->query('cat=4&showposts=11'.'&paged='.$paged); ?> | |
<?php while ( have_posts() ) : the_post();?> | |
<?php endwhile; ?> | |
<!-- pagination --> | |
<?php if ( $wp_query->max_num_pages > 1 ) : ?> | |
<div class="pagination"> | |
<?php wp_pagenavi(); ?> | |
</div> | |
<?php endif; ?> | |
<!-- end pagination --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment