<div class="slider-news">
<?php
if( have_rows('slider_news') ):
while ( have_rows('slider_news') ) : the_row(); ?>
<div>
<?php
$gal = get_sub_field('slider_image');
$url = $gal['url'];
$title = $gal['title'];
$id = $gal['id'];
?>
<img src="<?php echo $url; ?>" class="slider-img" data-url="<?php echo $id; ?>" data-name="<?php echo $title; ?>" alt="">
</div>
<?php endwhile;
endif;
?>
</div>
$('.slider-news').slick({
slidesToShow: 1,
slidesToScroll: 1,
fade: true,
arrows: true,
draggable: false,
});