When you are customizing your template or theme and using plugin for the same but don't know which plugin is active or not.
It can be really useful to be able to know if a specific plugin is activated.
It is very important to know about plugin in WordPress because broken plugins can hamper your blog badly.
Here is a simple way to check whether a plugin is activated or not. Just paste the code below in your theme file, wherever you'd like to check out if a plugin is activated or not.
Update the code with the plugin directory and name on line 4.
Thanks to wpmayor for this awesome tip. Pl consider it sharing with friends if you liked the trick.
It can be really useful to be able to know if a specific plugin is activated.
It is very important to know about plugin in WordPress because broken plugins can hamper your blog badly.
Here is a simple way to check whether a plugin is activated or not. Just paste the code below in your theme file, wherever you'd like to check out if a plugin is activated or not.
Update the code with the plugin directory and name on line 4.
Following php code need to update in your template
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(is_plugin_active('plugin-directory/plugin-file.php')) {
//plugin is activated
}
?>
Thanks to wpmayor for this awesome tip. Pl consider it sharing with friends if you liked the trick.
0 comments:
Important - Make sure to click the "Subscribe By Email" link below the comment for to be notified of follow up comments and replies.If you use Name/URL don't use keywords as your name (You Know Who You Are).
Post a Comment