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've created my own admin page in wp-admin folder using add_theme_page() function. How to pass variables from there to my blog? I mean what's the easiest way without arrays etc.

I've tried using "globals" but failed.

Thanks a lot.

share|improve this question
Your question is very vague. If you're trying to implement theme settings check out get_option / update_option – onetrickpony Jan 4 '11 at 2:17
Can you please give examples and use-cases for passing variables? As @Ambitious Amoeba said, your question is too vague to get a reasonable answer. – MikeSchinkel Jan 4 '11 at 2:41
up vote 2 down vote accepted

Read the codex page on creating options pages, and let us know if you run into any specific issues. It has a complete copy/paste example you can monkey with.

If you're trying to avoid learning WordPress' options mechanisms in favor of a more generic custom php solution, I understand where you're coming from, but recommend learning to do it the right way. It'll be a couple hours investment, but it'll pay off over time. For reals.

share|improve this answer

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.