Home / plugin / Check if a plugin is active
  • How to Check if a plugin is active

    check-if-a-plugin-is-active

    Adding this snippet to your wordpress theme will return true if the specified plugin is active. You will need to make sure you specify the name of the plugin sub-directory/file.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    activated
    <?php
       If (is_plugin_active('plugin-directory/plugin-file.php')) {
          //yes my plugin is active
       }
    ?>
    

    ( WordPress codex functions, hooks, in this snippet. )

    is_plugin_active,