Pagination links for custom query in admin dashboard show the same page number
-
Hi everyone!
I’m building a custom plugin to store numbers in a database table. Afterwards, the numbers will be outputted on a page in the admin dashboard. The page in question has a url structure that is something like this: “https://localhost/mysite/wp-admin?page=my-slug&op=view&id=1”. Everything was going fine until I tried adding pagination to the query results. I used paginate_links() to add the links. When I put the cursor on the page links while on page 1, the page numbers in the links are correct, ie. pagenum=1, pagenum=2. So when i click on “next” or page 2 “&pagenum=2” gets appended to the above url (which is correct). However when i’m on page 2 and i put the cursor on the page links, all the pages are linked as pagenum=2 so consequently clicking on the link to page 3 still takes me to page 2. It’s really strange because I used paginate_links() before on the frontend and it worked perfectly. Do I need to do something else since the page is in the admin dashboard?
- The topic ‘Pagination links for custom query in admin dashboard show the same page number’ is closed to new replies.