Installation

MINIMUM REQUIREMENTS

There are two ways to install Handy in your WordPress theme project. The first option is to install Handy in your WordPress plugin directory. And the second option, which is advised if you want to publish your theme, is to include Handy as a library in your theme.

First of all before continuing download Handy compressed version.

Setup as a plugin

  • Go to Admin Dashboard > Plugins, then click the Add New button.
  • Click the Upload Plugin button, upload the handy-customizer.zip file, and click Install Now.

WARNING

Before adding panels, sections, and controls to functions.php, make sure to check first if Handy class exist.

 
// Make sure to check if Handy class exists.
if ( class_exists( 'Handy' ) ) {
    // Add panels, sections and controls in here.
}

TIP

Here's a complete, proper example of adding panels, sections, and controls to functions.php.

 
if ( class_exists( 'Handy' ) ) {
    // Add panel.
    Handy::panel([
        'id'          => 'panel_id',
        'title'       => esc_html__( 'Panel', 'textdomain' ),
        'description' => esc_html__( 'Description Here', 'textdomain' )
    ]);

    // Add section.
    Handy::section([
        'id'          => 'section_id',
        'panel'       => 'panel_id',
        'title'       => esc_html__( 'Section', 'textdomain' ),
        'description' => esc_html__( 'Description Here', 'textdomain' )
    ]);

    // Add text field contro.
    Handy::field( 'text', [
        'id'          => 'text_id',
        'section'     => 'section_id',
        'label'       => esc_html__( 'Text', 'textdomain' ),
        'description' => esc_html__( 'Description Here', 'textdomain' ),
        'placeholder' => esc_html__( 'Text Placeholder', 'textdomain' )
    ]);
}

Setup as a library

  • Open the handy-customizer.zip file and extract it.
  • Copy the handy-customizer folder in your WordPress theme project directory.
  • Now include or require handy-customizer.php in functions.php.

TIP

Here's an example of how you can properly include Handy in functions.php.

 
// Require handy-customizer.php.
require get_parent_theme_file_path( '/handy-customizer/handy-customizer.php' );

// Make sure to check if Handy class exists.
if ( class_exists( 'Handy' ) ) {
    // Add panels, sections and controls in here.
}