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

In my plugin's options page, I'd like to have custom GET parameters. WordPress already has a "?page=" GET parameter, so simply linking to something like "?myparameter=value" won't work.

I though of reading the "page" parameter, and then linking to something like: "?page=&myparameter=value". This seems workable, but I don't know if its the best practice. The complexity of my plugin really doesn't warrant sub-pages for now.

So is this the best practice or am I missing something?

share|improve this question
up vote 1 down vote accepted

I'd recommend using add_query_arg():

  $url = add_query_arg(array(
           ), admin_url('admin.php'));

The second argument, admin_url('admin.php'), is optional - and if omitted it uses the url of the current page you are on.

share|improve this answer
Exactly what I needed. Thanks! – AgilE Oct 30 '12 at 16:15

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.