Installation
MINIMUM REQUIREMENTS
- PHP 7.3 or greater is required (PHP 8.0 or greater is recommended).
- MySQL 5.6 or greater, OR MariaDB 10.1 or greater, is required.
- WordPress 4.0 or greater is required (lastest version is recommended).
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 theAdd Newbutton. - Click the
Upload Pluginbutton, upload thehandy-customizer.zipfile, and clickInstall 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.zipfile and extract it. - Copy the
handy-customizerfolder in your WordPress theme project directory. - Now include or require
handy-customizer.phpinfunctions.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.
}