Check If Plugin Is Active In WordPress

Used before category names. Blog WordPress WordPress Development

Use following code to check if specific plugin is active or not in WordPress Theme.

if (is_plugin_active('plugin-slug/plugin-file.php'))

For example, to check if One Click Demo Import activation.

if (is_plugin_active('one-click-demo-import/one-click-demo-import.php')){
    echo "Plugin is active";
}
Tags: