WP_List_Table pagination 302 redirecting to paged=1


I’ve been working with an extended class for WP_List_Table and everything is working well including the search, however the pagination isn’t working.

While watching the network traffic I see 302 redirects for any URL that doesn’t have paged=1. So for example if I try paged=12 it redirects multiple times until it’s back at paged=1

GET http://localhost/wp-admin/admin.php?page=options&paged=12
302: http://localhost/wp-admin/admin.php?page=options&paged=5
200: http://localhost/wp-admin/admin.php?page=options&paged=1

Unfortunately I’m not familiar enough with the WP framework to know why it would be generating all these 302’s and why it seems to be doing a decreasing search of paged using odd increments.

Any help would be appreciated. I’ve read all the associated questions on stack exchange for this but nothing seems to be similar to this problem.
The total items and page numbers are correct based on my dataset. I see the get_pagenum() method reading the requested value, but then it gets 302 to another paged value until it hits 1 again.

user6972 1 month 0 Answers 7 views 0

Leave an answer