Refer this: Paginate Codex
I can see that you are using custom query so you put this below and outside the while loop
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
$args = array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?page=%#%',
'total' => $wp_query->max_num_pages,
'current' => max( 1, get_query_var( 'paged') ),
'show_all' => true,
'end_size' => 1,
'mid_size' => 2,
'prev_next' => False,
'prev_text' => __('« Previous'),
'next_text' => __('Next »'),
'type' => 'list',
);
echo paginate_links($args);
?>
Related Posts:
- How to fix pagination for custom loops?
- Pagination not working on home page
- WordPress category & taxonomy loop with pagination
- How do I prevent one of two multiple loops from repeating on a second page?
- Two custom loops, pagination, offset
- Previous and Next Post link doesn’t work
- Pagination adding extra posts only on page 2
- multiple loops with pagination on the same page
- Enable infinite scroll on single.php [closed]
- How to paginate this custom loop? [duplicate]
- Make a custom loop inside single.php with pagination
- Why do I get `Call to a member function have_posts() on a non-object `? [closed]
- Pagination gives extra page with no results
- Get Pagination (WP-PageNavi) not to work
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- How can i use the same template file with a widget and category loop?
- Complex query and posts pagination
- Why only one post (and no pagination) on this variation of the loop?
- Calling & display certain product category loop and pagination on the homepage
- Make blog page show 10 on first page, 9 on every other page
- Pagination for multiple loops
- How to fix pagination for custom loops?
- How can I paginate this?
- Genesis multiple category custom loop 404s after first page
- How to fix pagination for custom loops?
- Pagination – works on local but not live dev!
- How do I paginate a get_posts() request inside another page loop (Paginating childpages)
- Pagination on Single Post
- How to get my loop to paginate?
- Distribute Gallery Images Every nth in Loop
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- How to exclude or filter password protected posts when using next_post_link() previous_post_link
- How do I get my loop.php to properly paginate?
- First archive page with a few posts
- How to pass a variable to get_template_part that’s updated every time the template part is called?
- Pagination broken after using 2 loops to show content
- Pagination on custom post type on front-page.php
- I have broke my pagination, same posts on all pages (index.php)
- WordPress Alphabetical Sort Loop Issue
- Frontpage pagination by week
- How can this multiple loop have pagination as described?
- Display more than 10 posts on author.php file
- static page with multiple loops breaks post pagination
- Pagination for two loops
- Loop info in jquery Tabs – loop into a variable?
- Skip 5 latest post while paging?
- Why does my WP_Query pagination on a custom page.php only loads the homepage?
- How to insert content before pagination in loop?
- Pagination on a underscore custom theme
- WordPress multiple loops with default pagination
- How to fix pagination for custom loops?
- Style first 3 posts differently and use a 2nd loop to get rest of posts / offset and pagination broken
- adding tax_query to $query_string
- Custom loop not working in singular.php, working in other pages
- Alternative layout the loop
- How to fix pagination for custom loops?
- Adding pagination to WP_Query [duplicate]
- WordPress Numeric Pagination with Query String [duplicate]
- How to fix pagination for custom loops?
- How to fix pagination for custom loops?
- Why is my pagination showing up?
- Displaying posts limit: can’t get pagination to display [duplicate]
- Paged homepage – requirements?
- Home page loop with pagination problem
- WordPress loop: Display if posts exist
- WooCommerce custom loop pagination on front page
- posts_nav_link() not working on index.php
- Custom Page Template and Category Exclusion
- WordPress loop put title into variable
- repeating posts on 2nd page to posts
- Limitless amount of posts in custom archive page
- Same posts within a paginated page
- Multiple loop with pagination in same page
- How to store wordpress title in a variable
- Insert multiple custom components after x-number of posts
- How to set and retrieve cookies while in the loop
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- What exactly defines a Main Loop and a Secondary Loop?
- query_vars Filter: Would You Ever Use It When $_GET is Available and You Don’t Need a ‘Pretty’ URL?
- Ajax loop refresh on click
- the_excerpt(), get_the_excerpt() and the_content() all killing “the Loop”
- Is get_posts() more efficient than The Loop?
- loop through all posts memory error
- Order archive results by post id in custom taxonomy template
- pre_get_posts for two loops on same page
- ACF – add a group inside a repeater [closed]
- How to create bootstrap grid loop?
- Count post views in loop
- add offset to archive page
- How to display 3 post per slide
- Pass global variable from Page 1 to page 2 (Pagination)
- Is it possible to set archive.php instead of index.php to display blog?
- Undefined index: page in loop load ajax content
- Deeply Nested Menu Loop with Twig using Timber [closed]
- Get featured image outside the loop using foreach
- strange parse error when including a loop template within another template
- Previous Posts Link and Next Posts Link Show All The Same Articles?
- Undefined variable: woocommerce_loop [closed]
- WPNavi pagination links not working on custom pages