Title: [Plugin: Meta Slider] Conditional loading
Last modified: August 21, 2016

---

# [Plugin: Meta Slider] Conditional loading

 *  [dontwakemeup](https://wordpress.org/support/users/dontwakemeup/)
 * (@dontwakemeup)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-meta-slider-conditional-loading/)
 * I’m struggling to work out if it is possible to load a Meta Slider plugin conditionally,
   i.e. if the screen is larger than mobile (so mobile users don’t get the slideshow).
 * I was planning on doing this like so:
 * `$('.homepage__slider').load('wp-content/themes/mytheme/slider.php');`
 * With the content of slider.php being:
 * `<?php echo do_shortcode('[metaslider id="8302"]'); ?>`
 * …but it turns out you can’t use short codes with ajax.
 * Is there a way of calling for the slider without using a shortcode perhaps?

The topic ‘[Plugin: Meta Slider] Conditional loading’ is closed to new replies.

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 0 replies
 * 1 participant
 * Last reply from: [dontwakemeup](https://wordpress.org/support/users/dontwakemeup/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/plugin-meta-slider-conditional-loading/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
