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') ) { ?>
                    <div id="login"><?php include (TEMPLATEPATH . '/inc/userlogin.php' ); ?></div>
                <?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') ) { ?>
                    <div id="login"><?php include (TEMPLATEPATH . '/inc/userlogin.php' ); ?></div>
                <?php } ?>

5 Answers
5

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

UPDATED:

Please check is_plugin_active

Leave a Reply

Your email address will not be published. Required fields are marked *