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!!
- The topic ‘Adding Pagination for custom post types’ is closed to new replies.