Closed Kendoulou closed 2 years ago
Ok, so I might have found a solution that fits me really well. Here are the changes I made :
In images-settings.php I added this checkbox :
$this->form->checkbox( array(
'id' => '_shuffle_images',
'name' => esc_html__( 'Shuffle', 'carousel-slider' ),
'label' => esc_html__( 'Shuffle Images Order', 'carousel-slider' ),
'desc' => esc_html__( 'Check to shuffle images order at each page refresh.', 'carousel-slider' ),
'std' => 'off'
) );
In images-carousel.php :
After : $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
I added $_shuffle_images = get_post_meta( $id, '_shuffle_images', true );
And after
<div <?php echo join( " ", $this->carousel_options( $id ) ); ?>> <?php
I added the lines :
if ( $_shuffle_images == 'on' ) {
shuffle($images_ids);
}
Please add this feature in your next update !
Thanks a lot for all your work ! Most customizable carousel I found so far.
But I think a feature is missing : shuffle images order.
I did it for my website by modifying your plugin. In template\public\images-carousel.php I added
shuffle($images_ids);
just before yourforeach ( $images_ids as $image_id ):
I think it will be cool to enable it as a parameter of your carousel.
Thanks again for your work