This tutorial goes over how to recommend and require WordPress plugins to be install and used when a user activates your WordPress theme. In this tutorial I show how to include the Kirki toolkit.
You can use the TGM Plugin Activation library to add any plugin to your WordPress theme. All it does is alert the user about the recommended or required plugins that are needed in order to use the WordPress theme they activated. This is a great way to get users to install a custom plugin or a plugin that is not in the WordPress plugin directory. In this tutorial, I show you have to use this library with the Kirki toolkit.
Add Kirki to WordPress theme with TGM Library
- Go to tgmpluginactivation.com and download the library
- Add the files to your WordPress theme and rename the
- Make a call to your newly renamed file(
tgm-plugin-activation.phpin video) in your
- Edit the require_once path in the
- Edit the
tgm-plugin-activation.phpmarkup to include the Kirki Toolkit. The following is the code used in the video:
- Save the changes and verify the notification appears from the WordPress Dashboard.