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'm using Wordpress Options Theme and I'm getting an issue.

Here's the code:

$options[] = array( "name" => __('Texto de botón de enlace a cotización',THEMENAME),
                    "desc" => __('Inserta el texto que aparecerá en los botones de cotización',THEMENAME),
                    "id" => "ns_custom_caps_quote_btn",
                    "std" => __('Cotizar', THEMENAME),
                    "type" => "text");

And when I reset to default, the input returns "a" instead of "Cotizar".

Any suggestion?

Thanks in advance.

share|improve this question
Whats the CONSTANT for? Should just be "std" => "default value" – userabuser Oct 24 '12 at 14:21
It does not work neither. The constant is for internationalisation purposes. I stripped the function __() and put the plain string and does not work neither. – DeryckOE Oct 24 '12 at 14:23
Have you tried hitting "restore defaults" button on the options page? Reason I say this is that you can save an "empty" string in the instance of this framework so the default only applys when there is no value saved for that given field. – userabuser Oct 24 '12 at 14:27
This question is impossible to answer without seeing your entire Theme Settings implementation. Can you edit the question to include all relevant code, or link to a Pastebin or similar that contains the code? – Chip Bennett Oct 24 '12 at 14:31
@ChipBennett To clarify he is using: wptheming.com/options-framework-theme - I only know because I'm using the same one on a particular project and know the behavior he is describing. – userabuser Oct 24 '12 at 14:33
up vote 0 down vote accepted

Values set in the 'std' key of the array,

'std' => 'your default value'

Are saved to the database on first initialization of the framework.

Once you overwrite the default value and or remove the default value, even if left as a blank field, the default no longer applies unless you hit the "restore defaults" button.

share|improve this answer
I'ts working now userabuser. Thanks a lot. I will check this as solved using your answer if you don't mind. – DeryckOE Oct 24 '12 at 14:37
No problem, you will observe that the behavior I describe is in fact correct anyway when you go ahead and edit your fields. Watch how the defaults don't restore themselves unless you intervene by hitting the restore button. All the best. – userabuser Oct 24 '12 at 14:38
Ok, I have taked note of your recommendation. I will upload now to final server and I hope it works fine, as in the local server. Thanks again! – DeryckOE Oct 24 '12 at 14:43

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.