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.

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

Share this snippet


Comments (1) - Leave yours

Leave a Reply

Your email address will not be published. Required fields are marked *

Please respect the following rules: No advertising, no spam, no keyword in name field. Thank you!