Title: Set Carousel Limits
Last modified: August 31, 2016

---

# Set Carousel Limits

 *  Resolved [KaosconK](https://wordpress.org/support/users/kaosconk/)
 * (@kaosconk)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/set-carousel-limits/)
 * Hi!
    I’m using carousel on my site to show diferent profiles. I changed the CSS
   and I add a border of 4 px to each pic. [http://insomnemagazine.com/](http://insomnemagazine.com/)
 * The problem is that I don’t know how to set a determinated items to show per 
   pass. This means that when I click on an arrow, the animation goes to the end
   of the items, only showing the fisrt and last items. I can’t stop in the middle
   items.
 * Thanks!!
 * [https://wordpress.org/plugins/ml-slider/](https://wordpress.org/plugins/ml-slider/)

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

 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/set-carousel-limits/#post-7335995)
 * Hi there,
 * Could you try adding the following code to your functions.php page:
 *     ```
       function metaslider_flex_params($options, $slider_id, $settings) {
           if ($slider_id == 5) { // check for slider ID (optional)
               $options['minItems'] = 11;
               $options['maxItems'] = 11;
           }
           return $options;
       }
       add_filter('metaslider_flex_slider_parameters', 'metaslider_flex_params', 11, 3);
       ```
   
 * Thanks,
    Dave
 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/set-carousel-limits/#post-7335996)
 * Your slider ID is 46, so change
 * `if ($slider_id == 5) { // check for slider ID (optional)`
 * to
 * `if ($slider_id == 46) { // check for slider ID (optional)`
 *  Thread Starter [KaosconK](https://wordpress.org/support/users/kaosconk/)
 * (@kaosconk)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/set-carousel-limits/#post-7336004)
 * It works but there is a problem, my images become very big and don’t respect 
   the width and height fixed.
 * It works more or less if I set “carousel margin: 0px”, but some imgages are shown
   as a half.

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

The topic ‘Set Carousel Limits’ 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/)

## Tags

 * [items](https://wordpress.org/support/topic-tag/items/)
 * [limits](https://wordpress.org/support/topic-tag/limits/)
 * [margin](https://wordpress.org/support/topic-tag/margin/)

 * 3 replies
 * 2 participants
 * Last reply from: [KaosconK](https://wordpress.org/support/users/kaosconk/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/set-carousel-limits/#post-7336004)
 * Status: resolved