Snippets

Test if a plugin is active

Paste the code anywhere on your theme files where you need to test if a specific plugin is active.

<?php
   if (is_plugin_active('plugin-directory/plugin-file.php')) {
      // the plugin is active
   }
?>

Share this snippet

 
  • http://goask.it Jonas

    If it’s an active plugin, wouldn’t it just be easier to go test it in action?