Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

http://pastebin.com/TPV5YvD9

Thanks in advance.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

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.