## if plugin is active? check if plugin is enabled or not?

Question

I’m using the mingle plugin and the mingle-forum plugin.

I want to show a certain part on my site only if those two plugins are active. How can I solve this?

<?php if ( is_plugin_active('mingle-forum') ) { ?>
<?php } ?>


This throws a php error. Call to undefined function is_plugin_active

Any idea what I’m doing wrong?

update:

<?php if ( plugin_active('plugin-directory/mingle-forum/wpf-main.php') ) { ?>
<?php } ?>

in progress 0
12 years 2011-04-21T07:35:18-05:00 0 Answer 84 views 0

1. This function exists in wp-admin/includes/plugin.php so I’m assuming it doesn’t get included by the theme.
You can either require it, or just create your own version of it – see here: http://wordpress.org/support/topic/is_plugin_active
Please check is_plugin_active