I am looking for the bugs about an hour but i can't find anything. Can you look and say why my theme option is not working?

Problem: The theme option not saving. Even the default option is also blank. I checked the value via php my admin.

Check the code in pastebin. And also how i can debug this kinds of problem?


Thanks in advance.

2 Answers 2


A little tricky to say by looking at code alone.

The first thing you need to check in such cases - if your validation function receives data from submitted form. var_dump() input and die; right after that to stop execution and prevent redirect back.

Depending on what you get there (if anything) check back through Settings API functions. There are a lot of arguments to juggle with those and it is easy to mix then up.


very hard to say exactly where it is dying. i used to try to handle my own theme options, but now there are so many good plugins that handle all the hard parts for me i can just focus on actually creating the options i need for my clients.

i'm partial to Devin Price's Options Framework: http://wordpress.org/extend/plugins/options-framework/

but i've heard good things about OptionTree and Fitr http://wordpress.org/extend/plugins/tags/theme-options

just a suggestion, sorry i couldn't help more.

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.