Reputation: 1961
How can I activate plugin using function.php? so when the theme is activated, it will also activate specific plugins. thanks
Upvotes: 0
Views: 975
Reputation: 1961
@me Quite Simple
require_once('path../wp-admin/includes/plugin.php');
activate_plugin($plugin_path); // Activate Plugin
Upvotes: 1
Reputation: 1404
You can include() the plugin's main php file, but you may have some problems with some of the plugin's hooks so beware :)
Upvotes: 0