I use Glide JS for a Slideshow that I built with ACF and Gutenberg Blocks.
But there is an issue with the next button. The ">" does not get rendered correctly – and it destroyes the whole DOM. Is there an alternative for the "data-glide-dir" next command? When i remove the data-glide-dir=">" everything works just fine.
Below is the code I use – the screenshot shows how it finally gets rendered in the browser.
<?php $gallery = get_field('images'); ?>
<?php if( $gallery ) : ?>
<div class="gcont">
<div class="glide">
<div class="glide__track" data-glide-el="track">
<ul class="glide__slides">
<?php foreach( $gallery as $image ) : ?>
<li class="glide__slide"><img class="full-width-image" src="<?php echo esc_url($image['sizes']['large']); ?>" alt="<?php echo esc_attr($image['alt']); ?>"></li>
<?php endforeach; ?>
</ul>
</div>
<div class="glide__arrows" data-glide-el="controls">
<button class="glide__arrow glide__arrow--prev" data-glide-dir="<">prev</button>
<button class="glide__arrow glide__arrow--next" data-glide-dir=">">next</button>
</div>
</div>
</div>
<?php endif; ?>