Title: Does MetaSlider support function_exists
Last modified: August 21, 2016

---

# Does MetaSlider support function_exists

 *  Resolved [Danny](https://wordpress.org/support/users/dannyfoo/)
 * (@dannyfoo)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/)
 * Is it possible to use if ( function_exists ( ‘function-name’ ) ) with the Meta
   Slider ?
 * Because I was looking for the function-name for Meta Slider but couldn’t find
   it.
 * [http://wordpress.org/plugins/ml-slider/](http://wordpress.org/plugins/ml-slider/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/#post-4481799)
 * Hi dannyfoo,
 * I’m not sure what you mean sorry.
 * The only way ‘in’ to Meta Slider is through the shortcode, if you need to use
   it in a template then you can use the template code that you can find in the 
   Usage section of Meta Slider.
 * If you could let me know what you’re looking to do I might be able to help.
 * Regards
    Tom
 *  Thread Starter [Danny](https://wordpress.org/support/users/dannyfoo/)
 * (@dannyfoo)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/#post-4481841)
 * Hey Tom, thanks for answering my query.
 * I’m developing a section in my theme to only show the slideshow if the plugin
   exists / enabled. Otherwise, it’ll display a “backup” image.
 * Something like this:
 *     ```
       <?php if ( function_exists('MetaSliderPlugin') ) { ?>
       			<?php echo do_shortcode('[metaslider id=01 percentwidth=100]'); ?>
       		<?php } else { ?>
       			<img src="<?php bloginfo('stylesheet_directory') ?>/images/homepage-feature-image.jpg" alt="feature image" />
       		<?php } ?>
       ```
   
 * I hope this makes things clearer
 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/#post-4481864)
 * Hi Dannyfoo,
 * You could use [is_plugin_active](http://codex.wordpress.org/Function_Reference/is_plugin_active)
   I think.:
 *     ```
       <?php if ( is_plugin_active('ml-slider/ml-slider.php') ) { ?>
       			<?php echo do_shortcode('[metaslider id=01 percentwidth=100]'); ?>
       		<?php } else { ?>
       			<img src="<?php bloginfo('stylesheet_directory') ?>/images/homepage-feature-image.jpg" alt="feature image" />
       		<?php } ?>
       ```
   
 * Out of interest, who is the theme for? Is it personal or are you planning on 
   releasing it? (If you do release it – great!)
 * Regards
    Tom
 *  Thread Starter [Danny](https://wordpress.org/support/users/dannyfoo/)
 * (@dannyfoo)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/#post-4481882)
 * Hey Tom, thanks for the heads up about is_plugin_active. Didn’t realize this 
   function was available.
 * This theme is for a small project I’m doing for a friend. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Does MetaSlider support function_exists’ is closed to new replies.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=3523572)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Danny](https://wordpress.org/support/users/dannyfoo/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/does-metaslider-support-function_exists/#post-4481882)
 * Status: resolved