Latest Updates » [1] Auto XML Sitemap [2] Create Contact Page [3] Blogger and Wordpress Templates! Download Now !


Thursday 11 July 2013

WPTRICK: How to check plugins are active in wordpress



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.

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.


Kindly Bookmark this Post using your favorite Bookmarking service:
Technorati Digg This Stumble Stumble Facebook Twitter

Advertise Here

0 comments:

Post a Comment


ABOUT THE AUTHOR

Hi! I am K Ajay, currently live in Chandigarh, India. A young Web Designer, Pro Blogger, Graphic Designer & an addicted Web Developer. I love working on Blogger and WordPress using CSS Tricks,and Web Designing. Read More...

FOLLOW US HERE


RANDOM POSTS

Bwidgets4all-Helping Bloggers with Blogging Tricks © 2013. All Rights Reserved | Free Blogger Templates | | Back to Top