I ran your code, and the problem I see seems to be opposite what you describe– Page 1 never sets as the current page. Assuming that is the issue, I understand the puzzlement. That one is tricky to work out. You need to set base
to an absolute URL.
'base' => get_permalink( get_the_ID() ). '%_%',
Or something similar that works in the context your need. That is, get_the_ID()
does not work in all contexts. The absolute URL is the key though.
Related Posts:
- Can I use paginate_links() to add a pagination list, yet prevent it from inserting links?
- Paginate Links not working
- Changing pagination list class
- Paged posts – how to use numbers and next/previous links?
- How to display pagination links for WP_User_Query?
- Paginate links with “ugly” and “pretty” permalinks?
- Strange paginate_links behavior. First page link is always whatever page I’m on, all other links are correct
- Pagination Not Displaying on Custom Term Archive
- Combining WordPress pagination functions for archives and search results
- How to display next and prev pagination links with WP_User_Query?
- Paginate a list of users?
- paginate_links() outputs extra empty pages on custom loop
- In pagination, change link for page 1 to homepage
- How to use “offset” to paginate get_users?
- Last page in pagination does not match max_num_pages – the overall post count is less according to pagination
- Invalid previous pagination links generated from paginate_links()
- Using Ajax in the prev_posts_link and next_posts_link
- Limiting number of visible links displayed with wp_link_pages
- search with pagination not working as expected
- Pagination Not Working on `WP_Query` Archive Page
- Include a leading zero in pagination
- Pagination Links showing incorrect previous page number
- Custom admin page pagination permissions error
- Paginate Links – Mid Size Less Than 2
- Paginate_links only working on first page
- Automatically adding a link to the next page link before ” tag in posts?
- How to add pagination to category templates
- How to Show Next-Previous Link Only
- Show number of pagination pages even when total under two
- Can’t Add Pagination
- Sidebar pagination posts not shown when sidebar is in single.php
- Broken pagination links on WP 4.9.10 blog pages
- How to add post page pagination to template part?
- 404 page not found on pagination in home page while navigating to next page
- The pagination is working on Local, not on LIVE. why?
- WP_User_Query counter not updating with pagination
- Paginate Links in Wp Query Shortcode
- Extra pagination pages being wrongly generated
- Google Indexed sub pages in wordpress pagination in post
- Why Am I getting an error when I add the number parameter to my WP_User_Query?
- Paginate Links function: Page 1 doesn’t work
- Disable pagination on frontpage
- Paginating custom posts in categories yields a 404 error
- WordPress 404 pagination (/page/2) error?
- How can I get my pagination to recognize that it is on the first page?
- Pagination for user list
- Default pagination in Home/Front page
- Pagination only working on index page not on a template page
- Pagination Broken on Loop using ACF
- Is it possible to paginate posts correctly that are random ordered?
- How to determine if I’m on the first page of pagination?
- How to determine if theres a next page
- WordPress /page/2 404 pagination problem – what to do?
- Why do you need an unlikely integer in paginating?
- How to search for (partial match) display names of WordPress users?
- 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
- List users by last name in WP_User_Query
- Pagination resolving to first page only
- how to get pagination link url?
- add_rewrite_rule – working fine but broken for pagination
- paginate_links() don’t properly work in search.php?
- How to get the number of Pages in a single Post Pagination?
- Aggregate comments, with pagination
- post pagination names, not numbers
- How to fix pagination after rewriting url? ie. www.site.com/players/type/pro/page/3/
- How to paginate the get_users function?
- Display “Page 3 of 5” for a paginated post
- Getting paginate_links() ‘end_size’ to display none
- Implementing a general Table of Content across single paginated post pages
- Pagination of RSS2 feed
- How to paginate attachments in a secondary query as gallery?
- Custom WP_Comment_Query with pagination and orderby?
- Pagination: How do I always show ‘previous’?
- Getting all user metadata from user
- Next/Previous Links in same category
- How To create ajaxed wp-pagenavi?
- Single Page View for Paginated Posts
- How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?
- Wp_User_Query not sorting by meta key
- WP_User_Query with combined meta query – not working?
- Using paginate_links() to generate “1, 2, 3 … 10, 20, 30, 40… 55” paginations
- Change class=”page-numbers” in pagination
- How to add custom query filters in WP_User_Query
- pre_user_query meta_query admin user list
- Check if on last page of paginated post using wp_link_pages
- Custom Search Page Pagination Not Working
- What is the most efficient way to search users by their display name?
- Varying the number of posts per page from the first one
- Using pagination with get_posts on page type
- List posts based on first letter of posts
- Pagination for sub-pages
- Modifying WP_LIST_AUTHOR Functions to output all users in a grid (and Paginate)
- How to get post pagination like this
- How to paginate a list of tags
- Non existing blog pages are not redirected to 404
- posts_per_page & pagination conflict
- How to implement pagination eg. newer – 3 – 4 – 5 – 6 – 7 – older
- How do I sort multiples pages?
- Problem: ( kriesi ) pagination doesn’t work in homepage [duplicate]