Check the mid_size parameter in paginate_links
mid_size: How many numbers to either side of current page, but not including current page. Default 2.
So set it to: 'mid_size' => 1
Also you probably don’t want to show the first and last page, so set it to 0 (it’s 1 by default): 'end_size' => 0
Hope this helps.
–
EDIT:
It seems like the end property does not hide the last element. The easiest way is to hide it is using CSS:
.dots ~ .dots + .page-numbers { display: none; }
Otherwise, to remove the actual output from the function you would need to tweak it. You can return an array changing the type
argument, loop through the elements and remove the one you are not interested in.
Related Posts:
- How to display pagination links for WP_User_Query?
- post pagination names, not numbers
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- Implementing a general Table of Content across single paginated post pages
- Custom WP_Comment_Query with pagination and orderby?
- Pagination: How do I always show ‘previous’?
- Single Page View for Paginated Posts
- Varying the number of posts per page from the first one
- Using pagination with get_posts on page type
- How to get post pagination like this
- Static front page with recent posts pagination
- Paginate tags page
- How to display next and prev pagination links with WP_User_Query?
- Custom taxonomy list and sortby letter pagination problem
- Custom Page Template for “Older Posts” Pages
- How to change title tags on paginated posts?
- 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?
- add spans and characters into paginate_links
- Having issues with wordpress pagination with multiple categories
- wordpress Next/Previous post in same category not working
- WordPress Pagination not working, any ideas?
- Blocking author paging for blog entries?
- Get total posts found, but while using limit for pagination? get_posts
- Show post count in wordpress instead of page count in wordpress pagination
- WordPress Pagination with Get Value
- Customize WordPress Core Template
- How to add a zero before numbers in WordPress Post Pagination?
- next_posts_link does not work when querying a specific category
- Tabbed content with Pagination
- Next and Previous buttons for navigation
- Offset a post in the loop, with using PageNavi Plug-in
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- Randomised Post Time
- WordPress paginate_links() function doesn’t generate properly links after apply filters
- Frontend sorting
- Pagination on home page not working
- Limiting number of visible links displayed with wp_link_pages
- Pagination not working in custom page, only working in post page
- Only show Previous & Next button in Pagination
- Pagination isn’t created when there is only one page of posts
- Custom pagination code is not working
- Different layout on second page
- Pagination Not Working When Modifying Loop Based on Post Category
- custom posts archive pagination links /page/2/ ends up in 404
- WP Query for all posts
- Pagination for Custom WP_Query not displaying page 2 results
- pagination error in taxonomy: Warning: Division by zero
- Pagination Links Not Showing Up on single.php posts on iOS Devices
- next_posts_link(); & previous_posts_link(); not working properly
- Paginate_links only working on first page
- Ending Pagination loop in PHP
- What is the best way to implement ajax based pagination on custom query based templates?
- Paginate the_content automatically? [duplicate]
- Custom post type pagination like “previous current/all next”
- pagination links not displaying
- Page navi for template page
- WordPress paginate_links function: How do i ensure the page number is not less than 1 and not greater than last
- Pagination on page 2+ only
- How to replace pagination with Next/Previous for multi page posts?
- How to Add Pagination to Page?
- Disable and redirect pagination of Home
- Can’t Add Pagination
- How to hide empty pagination button when no previous page
- Pagination not working on homepage, On other pages it is working
- next and previous category name and link parent only wordpress in archive page
- WP_User_Query counter not updating with pagination
- Remove Number Of Pagination [closed]
- I would like help getting my pagination to work
- Display Both next previous and number in single page [duplicate]
- Need help on wordpress pagination script
- Update Gallery Randomly in every hour with no duplicates?
- Display NEXT and PREVIOUS pagination? [duplicate]
- Custom page pagination based on Kriesi pagination
- Test for if you’re on 1st page of paginated post (with nextpage quicktag)
- Pagination issue [duplicate]
- How can I get my pagination to recognize that it is on the first page?
- Pagination link problem when reaching the second page
- Add next and previous post links on pages like category, tags or archive pages
- Get next and previous page of paginated post
- Pagination 404 Not Found child page
- How to group posts by months and add pagination?
- Stop loading more posts if none left AJAX
- WordPress: Getting “Newer Posts” and “Older Posts” links on a Specialized Page Template
- Intercepting $_GET variable from custom pagination
- Default pagination in Home/Front page
- How can I remove page slug for all pagings?
- Making a Killer wp_link_pages
- Add pagination to the posts retrieved by below query [duplicate]
- pagination leads to 404 page
- Please Help me with Archive 404 Pagination
- Show pagination in WP_Query
- Pagination Not Working Properly
- How to add wordpress pagination [closed]
- How to automatically load more data when users reaches at the bottom of the page of the wordpress site?
- How to change `page` slug in pagination? on a specific pagination result (not globally)
- Two pagination in one page without being synchronous
- Change “/” (slash) before page number in pagination path to “-” (hyphen)