0

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.

2
  • 1
    Your question is very vague. If you're trying to implement theme settings check out get_option / update_option Jan 4, 2011 at 2:17
  • 1
    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. Jan 4, 2011 at 2:41

2 Answers 2

2

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.

1

I think this should help you get started

10+ Rare WordPress Theme Options Page Tutorials To Get You Started

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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