Install Dependencies During Genesis Theme Setup
One-click theme setup #
- Theme setup introduction.
- See full onboarding examples.
- Install plugins.
- Import content.
- Set up navigation.
- Import widgets.
- Run code.
- Create Starter Packs.
- Update theme settings.
Install plugins #
Plugins you add as dependencies are installed and activated before content is imported.
Only plugins from the WordPress.org repository are currently supported.
Add plugins as dependencies to your onboarding config like this:
* Genesis Sample.
* Onboarding config to load plugins and homepage content on theme activation.
* @package Genesis Sample
* @author StudioPress
* @license GPL-2.0-or-later
* @link https://www.studiopress.com/
'dependencies' => [
'plugins' => [
'name' => __( 'Atomic Blocks', 'genesis-sample' ),
'slug' => 'atomic-blocks/atomicblocks.php',
'public_url' => 'https://atomicblocks.com/',
'name' => __( 'WPForms Lite', 'genesis-sample' ),
'slug' => 'wpforms-lite/wpforms.php',
'public_url' => 'https://wordpress.org/plugins/wpforms-lite/',
'name' => __( 'Genesis eNews Extended', 'genesis-sample' ),
'slug' => 'genesis-enews-extended/plugin.php',
'public_url' => 'https://wordpress.org/plugins/genesis-enews-extended/',
'name' => __( 'Simple Social Icons', 'genesis-sample' ),
'slug' => 'simple-social-icons/simple-social-icons.php',
'public_url' => 'https://wordpress.org/plugins/simple-social-icons/',
// Other config removed for this example.
'content' => ,
'navigation_menus' => ,
'widgets' => ,
- The plugin
slugis the basename for the plugin's main PHP file. This is the plugin folder name (if the plugin has a folder), a forward slash, and then the name of the PHP file containing the plugin header. It's the value returned by adding
var_dump( plugin_basename( __FILE__ ) );to the PHP file that contains the plugin header.
- Users can skip the onboarding process, so you should still check for plugin dependencies. If your theme uses plugin-specific code, check for plugin classes and functions before using them with
- If a site already has one of your dependencies installed, it will be activated but not upgraded if a new plugin version is available. Updating plugins is left to the user to prevent possible conflicts with their existing content. If your theme depends on functionality from a specific plugin version, check for that functionality using
class_exists(), or check the plugin version in your code.