Title: Adding Pagination for custom post types
Last modified: August 24, 2016

---

# Adding Pagination for custom post types

 *  [aronsamma](https://wordpress.org/support/users/aronsamma/)
 * (@aronsamma)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/adding-pagination-for-custom-post-types/)
 * Blain is my favorite theme, and I use it all the time. Unfortunately I’ve been
   having some trouble making a paginated archive page for custom post types. I 
   have one called ‘news’, and supposedly I should be able to go to mywebsite.com/
   news, and an archive page would automatically come up. That gives me a 404 error.
 * So, I made a custom template page and have a loop in it that looks like this
 *     ```
       $args = array (
       	'post_type'              => 'news',
       	'pagination'             => true,
       	'posts_per_page'         => '10',
       	'posts_per_archive_page' => '10',
       	'order'                  => 'DESC',
       	'orderby'                => 'date',
       );
       ```
   
 * After the loop, I add:
 * `<?php blain_content_nav( 'nav-below' ); ?>`
 * It pulls the first 10 news posts, but there is no pagination at the bottom.
 * Can you help me at all? How can I make the regular archive work? If that’s impossible,
   how can I make the custom template file work?
 * Thank you very much!!

Viewing 1 replies (of 1 total)

 *  Thread Starter [aronsamma](https://wordpress.org/support/users/aronsamma/)
 * (@aronsamma)
 * [11 years ago](https://wordpress.org/support/topic/adding-pagination-for-custom-post-types/#post-6019417)
 * OK, I figured some of it out. In my custom template, I used $query as my argument
   variable, but Blain ONLY accepts $wp_query, like so:
 * `$wp_query = new WP_Query( $args );`
 * Now the pagination appears, and looks right, but it doesn’t actually work if 
   I click on one of the other pages yet. I’ll update if I get it figured out.

Viewing 1 replies (of 1 total)

The topic ‘Adding Pagination for custom post types’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/blain/1.3.6/screenshot.png)
 * Blain
 * [Support Threads](https://wordpress.org/support/theme/blain/)
 * [Active Topics](https://wordpress.org/support/theme/blain/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/blain/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/blain/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * 1 reply
 * 1 participant
 * Last reply from: [aronsamma](https://wordpress.org/support/users/aronsamma/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/adding-pagination-for-custom-post-types/#post-6019417)
 * Status: not resolved