The easiest way to have page nav for the custom post is to use WP PageNavi. After activating this plugin you need to add the following code in your custom post template.
<?php
if(function_exists('wp_pagenavi')) {
wp_pagenavi( array(
'query' =>$loop
));
}
Related Posts:
- Two queries on the same page with pagination
- Pagination when using wp_query?
- Find out total number of pages in global query on archive page?
- Post_count only shows the number of results per page
- WordPress Pagination Not Working – Always Showing First Pages Content
- get_query_var function not working at all
- get_query_var( ‘paged’ ) not working outside of homepage
- Pagination returns 404 after page 20
- Combining two wordpress queries with pagination is not working
- How to paginate attachments in a secondary query as gallery?
- next_posts_link not working for loop called with ajax
- Why does pagination always break when used on any form of a home page?
- Pagination shows 404 after a certain number of pages
- Pagination not working for Custom search form & custom result template
- Pagination broken when merging search results with additional WP_Query
- Query with pre_get_posts to get pagination
- Is there a PHP function that can match anything after the given URL, so my IF statement will work in each instance?
- Add custom search results to main WP search [duplicate]
- How to bring specific post to front of wordpress loop?
- Pagination for custom query on single.php
- Pagination doesn’t work in custom page template [duplicate]
- Intentionally exceed max_num_pages on main query without getting 404?
- Array Chunks and Inserting Varying HTML in WP_Query
- Too many posts cause slow load when paginating
- How to output different posts per page?
- Multiple WP_Query loops with Pagination Not Working
- Posts loop with pagination on a single post page
- Custom pagination with WP_Query generating 404 error
- Offset Page Loops and Pagination
- Create A Loop With A Variable Number of Posts For Each Bootstrap Row?
- The pagination on index.php doesn’t work on a first page
- Get pagination working for custom loops within page templates
- pagination with ‘no_found_rows’ => true,
- how to handle multiple ajax wordpress queries?
- WordPress pagination not working using WP_Query
- posts_per_page not working for first page of pagination
- Adding column to wp_posts table or join wp_posts table with another table
- Two loops on archive page
- Pretty urls for custom pagination
- Custom post type archive pagination query issue
- paged variable not working for category/custom post archive
- WordPress Blog Posts with Pagination inside a Page/Post
- Reset WordPress Post Query to default
- Pagination only won’t work in author template
- wp query error while paging the posts
- Wp_query with 2 meta keys and array of meta values
- new WP_Query messes up pagination
- Pagination works in custom query loop but it doesn’t work in shortcode
- “paged” in WP_Query returns 0 posts
- Problem with get_page_by_path() using with WP_Query
- WP_Query to get post on frontpage
- Notice thrown when creating numeric pagination on custom query
- Content not displaying on paginated page
- Second loop pagination changes URL, not content
- Custom Homepage Pagination using WP_Query
- filter posts by meta key with pagination
- Adding pagination to sub-wp_query within a singular post page
- Pagination problem by using WP_Query
- Ajax (jquery) wp_query pagination returns -1
- WP_Query and pagination AGAIN?
- Function the_posts_pagination() not compatible with WP_Query arguments
- adding pagination to a foreach loop in wordpress
- Pagination of custom page with custom fields query
- pre_get_posts pagination not working
- Pagination not working on archive.php template?
- Pagination inside the blog page not working
- Pagination on archive.php not working?
- Custom Query Pagination not working on static front page
- Displaying Pages in Nav Sub-Menu with Specific Taxonomy Terms?
- WordPress search page pagination displaying but not functional
- Global page ID variable empty error
- pagination functions are not working
- Paginated Post List on Front Page
- Problem with custom WP_Query and underlying pagination/posts_per_page
- Pagination in WP_Query?
- 2 Loops on one page – pagination of 2nd loop ignore array of excluded posts
- 3 wp_query on one page with pagination for last query
- Archive – Show Page Month Headers
- Query post Pagination Problem
- Add pagination to table generated by wp_query
- Pagination for custom query throws 404 errors on last pages [duplicate]
- Pagination is not working on custom query inside a custom home page template
- Pagination not working in some author pages
- How to add archives (with pagination) to page template?
- No content found on page 2 of pagination with 1 post per page
- What is wrong with this pagination code?
- Ordering Custom WP_Query loop by meta key value with pagination
- Loop being strainge
- Pagination in custom query not working [duplicate]
- paginate_links() on page (shortcode output)
- Multiple loops on index page with sticky post and pagination
- Paginate wp_query while utilizing post__not_in
- Get next post when using pagination with WP_Query?
- WP_Query issues with argument posts_per_page
- Duplicate posts showing up in loop using infinite scroll
- Pagination showing same posts despite changing page
- Get author meta data with no published posts in author.php?
- Pagination with Custom Post Type not working on index.php: I get a 404
- Pagination on custom post type not working
- Pagenavi with archive page