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.

 

 

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

Be Sociable, Share!

Leave a comment