Installation

The Kirki PRO extension bundle or any Kirki PRO extension can be added to your project in 2 ways. Either bundle it within your plugin or theme or require the extension/bundle using a tool like TGMPA. In this article, we are going over both methods.

Require as Plugin

Any Kirki PRO extension can be installed as a regular WordPress plugin. It is recommended to use TGMPA to require the installation of your Kirki PRO extensions. This will ask the user of your theme/plugin to install the Kirki PRO extensions that you have included in your project.


Embed in Your Theme/Plugin

Individual extensions

To include any individual extension in your plugin or theme, add the extracted zip file you downloaded from your account area anywhere to your plugins/themes folder.

It is recommended to call the autoloader & initiate the extension in your theme/plugin like this.

Tab extension example:

if ( ! class_exists( '\Kirki\Pro\Tabs\Init' ) ) {
	require_once 'path-to-folder/kirki-pro-tabs/vendor/autoload.php';
	new \Kirki\Pro\Tabs\Init();
} 

Headline & Divider extension example:

if ( ! class_exists( '\Kirki\Pro\HeadlineDivider\Init' ) ) {
	require_once 'path-to-folder/kirki-pro-headline-divider/vendor/autoload.php';
	new \Kirki\Pro\HeadlineDivider\Init();
} 

Repeat the process for all Kirki PRO extensions you own.

Extension bundle

Extension bundle users can simply require all extensions like this:

if ( ! defined( 'KIRKI_PRO_VERSION' ) ) {
	require_once 'path-to-folder/kirki-pro/vendor/autoload.php';
	new \Kirki\Pro\Init();
}

Was this helpful?