woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.91k stars 1.69k forks source link

How to disable the slider if only one single image found in the ul list? #1687

Closed acrolink closed 6 years ago

acrolink commented 6 years ago

I have noticed that the slider works even if it is only one image. How to disable tbat?

jeffikus commented 6 years ago

The library assumes multiple images are being used. You should do the check in your logic that loads the slider. Assuming it's PHP, a simple if statement checking how many images are loaded would do the trick.