I am using contact form 7. I have successfully added to my page, Now I want to export the database onto a separate page with short code. I have the following code, but it results in the following error.


echo do_shortcode('[cfdb-html form="Contact form 1" show="Submitted,your-name"]${your-name}${your-email}${your-message}[/cfdb-html]');


Fatal error: Call to undefined function is_plugin_active() in /Users/anderskitson/Sites/fiftyfity/wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php on line 654

The Codex page for is_plugin_active explains what your problem is:

NOTE: defined in wp-admin/includes/plugin.php, so this is only available from within the admin pages. If you want to use this function from within a template, you will need to manually require plugin.php, like this:

<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); ?>
<?php is_plugin_active($plugin) ?>

mmmm but as far as I know the right way to display the shortcode is

 [cfdb-html form="Contact form 1" show="Submitted,your-name,your-email,your-message"][/cfdb-html]

Not the answer you're looking for? Browse other questions tagged or ask your own question.