Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Voices That Matter

  • Print
  • + Share This
From the author of Adding Customizer Support to Your Theme

Adding Customizer Support to Your Theme

Roll up your shirt sleeves; this bit requires some code! Don't worry; it's mainly just cut-and-paste. You'll need access to your functions.php and header.php files.

  1. Log into your WordPress Dashboard and choose Appearance > Editor.
  2. In the Templates list on the right side of your screen, click Theme Functions (see Figure 3).
  3. Add the following code before the closing ?> tag in your functions.php file, using the name of your theme in place of THEMENAME:
  4. add_action( 'customize_register', 'THEMENAME_customize_register' );
    function THEMENAME_customize_register($wp_customize)
    {

Figure 3 When you open the Editor, it will automatically display the style.css file. Choose Theme Functions from the file list on the right to edit your functions.php file.

  • + Share This
  • 🔖 Save To Your Account