WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a page in my admin with this custom query:

$rows = $wpdb->get_results("SELECT * FROM ej_feedback ORDER BY createdtime ASC");

I have made it successfully paginate as required in that the right amount of posts show on first page and the right amount of pagination links show up. Awesome!

However when I click on one of the pagination links to go onto page 2, I get an admin error:

You do not have sufficient permissions to access this page

The url looks like this:


I really don't know why I'm getting this error in the admin. Is it a more general issue with the admin or is it related to using pagination in the admin area? Any help would be much appreciated.

The script works perfectly on the frontend - I just think Wordpress has a problem with the URL generated.

share|improve this question

The last part of the URL is being treated as part of the page value..


The bold part is your plugin page, so when you go adding parts onto that URL it's considered to be part of that URL.

If you use this instead it should work no problem.


Note: You can actually reproduce the problem quite easily adding anything else on in the same manner, eg.


If you want pretty paged URLs for your plugin page you'll have to look into creating additional rewrites for those pages yourself, but that's perhaps for another question...(and not one i have time to answer - this particular issue was pretty easy to spot)

share|improve this answer
Thanks for your reply, I'll give this a try – Adam Moss Dec 12 '11 at 11:26
You're welcome. :) – t31os Dec 12 '11 at 11:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.