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

Quick question, I have a custom options page which posts to options.php, however I have a few sections to my options page where i change the post url like so: <form action='options.php?section=sectionname' ..>

when the options page reloads I need to check which section was just saved i.e. get the sectionname from the querystring, however the options.php page redirects to the options-general.php page and does not retain my query string.

can anyone think of either a way to retain the QS or tell me a better way to do this?


share|improve this question
up vote 2 down vote accepted

How about putting the current section in a hidden form field inside each section, and then when you reload the page, check $_POST['section']?

share|improve this answer
I've found a way around it in the end as you mentioned using the hidden field and a jquery click to set it then using get_option(...).. as i'm using custom options. – Alex Jun 18 '12 at 18:02

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.