try this:
$the_query = new WP_Query( array('posts_per_page'=>12,
'post_type'=>'customers_gallery',
'paged' => get_query_var('paged') ? get_query_var('paged') : 1)
);
?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
//YOUR CONTENT YOU WANT TO SHOW
<?php
endwhile;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $the_query->max_num_pages
) );
wp_reset_postdata();
Related Posts:
- How to display pagination links for WP_User_Query?
- How to show a single post on the front page but have normal paging?
- How to add CSS Class to previous_post_link or get previous/next post link URL
- Aggregate comments, with pagination
- Strange paginate_links behavior. First page link is always whatever page I’m on, all other links are correct
- Pagination: How do I always show ‘previous’?
- List posts based on first letter of posts
- Pagination for sub-pages
- How to implement pagination eg. newer – 3 – 4 – 5 – 6 – 7 – older
- Custom loop pagination issue ( pagination not showing up )
- Static front page with recent posts pagination
- Paginate tags page
- Category pagination shows same posts
- WordPress Pagination not displaying posts after certain page
- paginate_links() outputs extra empty pages on custom loop
- When to check for max_num_pages using WordPress REST API?
- Adding pagination to a custom archive template
- How to make my pagination loop continuously?
- Show next / previous text (button) all the time
- wordpress Next/Previous post in same category not working
- Pagination difficulty using custom query in genesis-based custom theme
- Placing Ads after every 10th Post with Infinite Scroll
- How to implement pagination in backward way eg. first – 20 – 19 – 18 – … – 3 – 2 – 1 – last
- WordPress Pagination not working, any ideas?
- Next & Previous (Pagination in this case) Not Appearing
- Limit Timber pagination number items
- List all posts by year with pagination
- WordPress wp_link_pages show only next/prev link
- Altering next_posts_link(); and previous_posts_link();
- Pass additional parameter in the URL
- Post timeline (pagination with date, not numbers)
- Why do next pages load the same content rather then older articles?
- Nested Pagination
- Pagination stopped working after assigning custom page template to new page (different slug)
- I want to remove numbers from the_posts_pagination function
- Wpdb result with pagination
- Yoast’s rel=“next” & rel=“prev” tag don’t work on static homepage’s paginated pages
- How to stop WordPress returning 404 on paginated pages after using add_rewrite_rule()?
- Invalid previous pagination links generated from paginate_links()
- Pagination not working on custom page
- 404 when using pagination in a category
- Pagination customization
- Pagination w/Static Front Page
- Limiting number of visible links displayed with wp_link_pages
- How do I fix this ‘Undefined variable:’ debug message?
- How do I paginate a list of categories?
- Post Pagination Modifications (wp_link_pages)
- /tag/tag_name/page/2 gives a 404 error
- Wp-pagenavi giving page not found on clicking page 2
- How can I change pagination numbers with next and back button?
- Post Navigation Not Working In Blog Template – Redirecting to same page with correct URI
- Pagination on and tag.php not working
- How to get rest api pagination headers via fetch
- WP Query for all posts
- Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?
- Page links are not working after moving domain [closed]
- pagination error in taxonomy: Warning: Division by zero
- How to remove /page/2/ from home page?
- wordpress custom search page pagination returns 404
- Problem when I try to insert pagination
- Change the format in the paginage_links
- Pagination on WP_User_Query not updating current page
- Blog pagination WITHOUT using max_num_pages
- paginate posts on admin page
- pagination links not displaying
- Page navi for template page
- How to replace pagination with Next/Previous for multi page posts?
- Disable and redirect pagination of Home
- Why my pagination gets 404?
- How to hide empty pagination button when no previous page
- How do i make the_posts_pagination look like my template?
- How to add post page pagination to template part?
- Custom pagination in wp
- 404 page not found on pagination in home page while navigating to next page
- Linking images in WordPress Paginated Post
- Set Pagination count according to post count
- WP_User_Query counter not updating with pagination
- Remove Number Of Pagination [closed]
- Pagination in Archives
- load certain content only on first page of pagination
- Pagination diplays always 2 pages
- Combining content breaks category pagination
- Custom Query & Rewritten URL Pagination 404
- Need help on wordpress pagination script
- Update Gallery Randomly in every hour with no duplicates?
- Search URL gives 404
- How to paginate query using get_categories()
- Need help with get_posts pagination
- WordPress 404 pagination (/page/2) error?
- Custom pagination generates title 404
- Excluding certain post status’s from pagination
- WordPress creating 404s under blog tags
- Pagination work! But title still says “Page Not Found”
- WordPress pagination URL posts not load
- Next / Previous Posts not working
- Default pagination in Home/Front page
- Use cookies in pagination
- Always show Next and Previous button in wp_link_pages ?
- pagination leads to 404 page
- Separate page for pagination possible?