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

Here is the code I'm using to add the section to the Customize panel.

function apple_customize_register($wp_customize){
$wp_customize->add_section('apple_footer', array(
    'title'    => 'Footer',
    'priority' => 120,
//------ display copyright in footer
$wp_customize->add_setting('theme_options[copyright]', array(
    'capability' => 'edit_theme_options',
    'type'       => 'option',
$wp_customize->add_control('theme_options[copyright]', array(
    'settings' => 'theme_options[copyright]',
    'label'    => __('Display Copyright'),
    'section'  => 'apple_footer',
    'type'     => 'checkbox',
    'value' => '1'
add_action('customize_register', 'apple_customize_register');

How do I use the values in my theme. I have tryed get_option('theme_options[copyright]'), get_theme_mod('theme_options[copyright]') and many more, but all var_dump out bool(false). Please tell me what I'm missing.

share|improve this question
$wp_customize->add_setting('theme_options[copyright]', array(
'default'    => '1',
'capability' => 'edit_theme_options',
'type'       => 'option',

There is nothing wrong except the default value (missing). You cant use your setting till you store it a value.

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.