Title: Theme customization error
Last modified: August 21, 2016

---

# Theme customization error

 *  [RistaCode](https://wordpress.org/support/users/ristacode/)
 * (@ristacode)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/theme-customization-error/)
 * I wrote this code inside my **functions.php**
 *     ```
       function sleepy_customizer_register($wp_customize) {
           $wp_customize->add_section('sleepy_colors', array (
                   'title'=> __('Colors','sleepy'),
                   'description'=> 'Modify the theme colors.'
             ));
            $wp_customize->add_setting('first_palette', array (
                   'default'=>'#3F7696'
             ));
           $wp_customize->add_control(new WP_Customize_Color_Control('$wp_customize', 'first_palette', array (
                   'label'=> __('Change the first pallete of colors.','sleepy'),
                   'section'=>'sleepy_colors',
                   'setting'=>'first_palette'
             )));
       }
   
       add_action('customize_register','sleepy_customizer_register')
       ```
   
 *  and this **error** ocurs :
 * Fatal error: Call to a member function get_setting() on a non-object in D:\xampp\
   htdocs\wp-includes\class-wp-customize-control.php on line 109
 * If anyone can help me i would be thankful 🙂

The topic ‘Theme customization error’ is closed to new replies.

## Tags

 * [theme customization](https://wordpress.org/support/topic-tag/theme-customization/)

 * 0 replies
 * 1 participant
 * Last reply from: [RistaCode](https://wordpress.org/support/users/ristacode/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/theme-customization-error/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
